PayPal PPCP (Complete Payments)
Scottsdale Mint uses Angelleye PayPal for WooCommerce (angelleye/paypal-for-woocommerce) with the PPCP (PayPal Complete Payments) advanced card processing integration.
This single gateway handles:
- Standard PayPal (wallet and linked card)
- Credit and debit cards via PayPal Hosted Fields
- Apple Pay
- Google Pay
Pluginโ
- Plugin:
angelleye/paypal-for-woocommerce - Gateway ID:
angelleye_ppcp - Mode: PPCP Advanced (hosted card fields, requires PayPal Advanced approval)
Integration Typeโ
The site uses PPCP Advanced (formerly known as PayPal Braintree Advanced), which means:
- Card number, expiry, and CVV fields are hosted by PayPal โ card data never touches Scottsdale Mint servers
- The checkout form renders PayPal's iFrame-based hosted fields
- This approach is PCI SAQ-A compliant
What Customers Seeโ
On the checkout page:
- PayPal button โ opens PayPal popup for wallet payment
- Debit or Credit Card section โ hosted card fields (name, card number, expiry, CVV)
- Apple Pay button (Safari on Apple devices)
- Google Pay button (Chrome on Android)
Configurationโ
Settings are in WooCommerce โ Settings โ Payments โ PayPal PPCP or in the angelleye_ppcp gateway settings.
Key environment variables (stored in .env):
| Variable | Description |
|---|---|
PAYPAL_CLIENT_ID | PayPal REST app client ID |
PAYPAL_SECRET | PayPal REST app client secret |
PAYPAL_ENV | sandbox or live |
PAYPAL_WEBHOOK_ID | Webhook ID for IPN/webhook validation |
Kount Integrationโ
PayPal PPCP transactions pass through Kount fraud screening before authorization. The Kount session ID is added to the PayPal order payload so transaction-level fraud scores are available.
Patches Appliedโ
The patches/ directory contains a patch for the Angelleye plugin:
0001-Dev-Removing-Angelleye-Logging-and-adding-checkout.patch
This patch:
- Removes excessive
error_log()calls from the Angelleye plugin that caused log flooding on Lambda - Adds checkout-related improvements for precious metals ordering
Refundsโ
Refunds can be processed directly from the WooCommerce Order screen:
- Go to WooCommerce โ Orders โ [Order]
- Click Refund
- Enter the amount and reason
- The Angelleye plugin calls the PayPal Refunds API automatically
Webhooksโ
PayPal sends webhooks to WordPress at:
POST /wp-json/wc/v3/payment/angelleye-ppcp-webhook-handler
Webhook events handled:
PAYMENT.CAPTURE.COMPLETEDโ payment capturedPAYMENT.CAPTURE.DENIEDโ payment declinedPAYMENT.CAPTURE.REFUNDEDโ refund processedCHECKOUT.ORDER.APPROVEDโ customer approved the order
Troubleshootingโ
| Issue | Action |
|---|---|
| "PayPal fields not loading" | Check browser console for CSP header blocks; PayPal CDN must be whitelisted |
| Apple Pay button not appearing | Must have Apple Pay merchant validation cert configured in PayPal account |
| Payment captured but WC order still "Pending" | Check webhook delivery โ PayPal webhook may be failing |
| Sandbox mode in production | Verify PAYPAL_ENV=live in production .env |