Repository navigation
Payments
Bosaj edited this page Sep 25, 2026
·
5 revisions
The application provides a multi-channel donation processing system supporting credit cards, PayPal, and direct bank transfers.
-
Frontend:
@stripe/react-stripe-jsand@stripe/stripe-jswithCardElement. -
Backend: Netlify Serverless Function at
/.netlify/functions/create-payment-intent. -
Security:
- Client bundle only contains the public
VITE_STRIPE_PUBLISHABLE_KEY. -
STRIPE_SECRET_KEYis securely stored in Netlify environment variables and never exposed to the browser.
- Client bundle only contains the public
-
Process:
- Donor selects donation amount and currency (USD, EUR, MAD).
- Frontend sends request to
create-payment-intentserverless endpoint. - Server creates Stripe
PaymentIntentand returnsclient_secret. - Stripe confirms card transaction client-side and saves record in Supabase
donationstable.
-
Frontend:
@paypal/react-paypal-jsusing standardPayPalButtons. -
Integration: Captures order on client approval and logs transaction to
donationstable with method'paypal'.
- Displays official Moroccan Bank Account details (RIB, IBAN, SWIFT, Beneficiary Name).
- Donor enters transfer reference or email.
- Administrator verifies incoming wire in the Admin Dashboard > Donations tab.
- Amount: 100 DH per year (previously 50 DH).
-
Source of truth:
MEMBERSHIP_FEEinsrc/lib/membership.js, used byMembershipRenewalModal(Stripe, PayPal, bank transfer, cash) and the adminMembershipHistoryModal. -
History: Each payment is stored in the
annual_membershipstable with itsamount, so past 50 DH payments still display correctly.
Production Web App: https://a-a-b-v.netlify.app/
Official Email: asosoufaraelkhir48@gmail.com | GitHub Repo: Bosaj/les-ambassadeurs-web
Facebook β’ Instagram β’ X (Twitter) β’ LinkedIn β’ WhatsApp
Platform developed & maintained by Oussama ELHADJI β All Rights Reserved Β© 2026