Skip to content

Commit

Permalink
multiply flat by rate
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-justin committed Sep 18, 2024
1 parent 1407426 commit 95d3077
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/donation/Steps/Summary/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export const processingFee = (details: DonationDetails): number => {

details.method satisfies "stripe";
/** @see https://stripe.com/pricing */
return fee(+details.amount, PROCESSING_RATES.stripe, 0.3);
const { currency } = details;
return fee(+details.amount, PROCESSING_RATES.stripe, 0.3 * currency.rate);
};

function fee(amount: number, rate: number, flat = 0): number {
Expand Down

0 comments on commit 95d3077

Please sign in to comment.