-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Summary:
Create a reusable component that displays donation total with optional transaction fee coverage and a toggle to add/remove the fee.
Behavior:
- Display base amount and calculated total
- Show fee breakdown when includeFee is true (e.g., "+$1.68 covers fees")
- Toggle switch with label + info tooltip linking to processor fee policy
- Precise fee calculation: fee = (baseAmount * feeRate) + fixedFee
- Use environment variables (.env) for fees (easy to update if Stripe changes rates), use 2.9% with a fixed fee of .30 for now.
- All amounts rounded to 2 decimals
Testing:
- Unit tests for fee calculations (various amounts)
- Toggle interaction and callback
- Snapshot for both states
Integration Notes:
- Should integrate with existing DonationForm component
- Stripe (as far as I know) doesn't have a way for us to fetch the fee of our transaction so it might be best to hardcode it in this case.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels