Merge PayPal views into cart.py, delete paypal.py

This commit is contained in:
Russell Ballestrini 2025-12-22 14:29:00 -05:00
parent 8121772233
commit 979c5117df
3 changed files with 322 additions and 552 deletions

View file

@ -33,11 +33,11 @@ export MPS_PAYPAL_SANDBOX_MODE=True
- `Invoice.payment_method` returns "paypal" for PayPal payments
- Saved payment methods stored in `PayPalUserShop`
## Routes
## Code
- `POST /paypal/create-order/{cart_id}` - Creates PayPal order (called by JS SDK)
- `POST /paypal/complete-checkout/{cart_id}` - Captures payment, creates invoice
- `POST /webhooks/paypal` - Webhook handler for payment events
- `make_post_sell/views/cart.py` - PayPal checkout functions (`paypal_create_order`, `paypal_complete_checkout`)
- `make_post_sell/views/billing.py` - Disconnect saved PayPal
- `make_post_sell/views/paypal_webhooks.py` - Webhook handler
## Database