import { FIXED_FEE , VARIABLE_FEE } from "@constants/stripe" ; import Stripe from "stripe" ; export const getVariableFee = ( amount , stripeFormat ? ) : number => { return Number ( ( amount * ( VARIABLE_FEE / 100 ) + 0.01 ) . toFixed ( 2 ) ) ; } ; param amount returns export const getStripeTotal = ( amount ) : number => { return amount + Math . round ( amount * ( VARIABLE_FEE / 100 ) ) + ( FIXED_FEE * 100 ) ; } ;