💳 Payments Guide
How Checkout Works
- User clicks "Buy" on a track
- Checkout page loads with PayPal Smart Buttons
- User clicks PayPal button — never leaves the page
- PayPal popup handles payment
- On approval, sale is saved via AJAX
- License is issued instantly
- Success message shows Play Now + Library buttons
Setting Up PayPal (Store Admin)
- Go to "Store Settings"
- Click "Payment" section
- Enter your PayPal email
- Select currency (GBP, USD, EUR, etc.)
- Save — payments route to your PayPal
Payment Flow
1. Buyer clicks PayPal button
2. PayPal popup appears
3. Buyer approves payment
4. onApprove fires
5. actions.order.capture() captures funds
6. AJAX saves sale to database
7. License issued
8. Success shown inline
Security Features
- Duplicate payment prevention (checks order_reference)
- PayPal Order ID stored for traceability
- SSL encrypted
- PayPal handles all card data — never touches your server