Skip to main content

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:

  1. PayPal button โ€” opens PayPal popup for wallet payment
  2. Debit or Credit Card section โ€” hosted card fields (name, card number, expiry, CVV)
  3. Apple Pay button (Safari on Apple devices)
  4. 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):

VariableDescription
PAYPAL_CLIENT_IDPayPal REST app client ID
PAYPAL_SECRETPayPal REST app client secret
PAYPAL_ENVsandbox or live
PAYPAL_WEBHOOK_IDWebhook 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:

  1. Go to WooCommerce โ†’ Orders โ†’ [Order]
  2. Click Refund
  3. Enter the amount and reason
  4. 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 captured
  • PAYMENT.CAPTURE.DENIED โ€” payment declined
  • PAYMENT.CAPTURE.REFUNDED โ€” refund processed
  • CHECKOUT.ORDER.APPROVED โ€” customer approved the order

Troubleshootingโ€‹

IssueAction
"PayPal fields not loading"Check browser console for CSP header blocks; PayPal CDN must be whitelisted
Apple Pay button not appearingMust 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 productionVerify PAYPAL_ENV=live in production .env