-
-
Notifications
You must be signed in to change notification settings - Fork 74
t523: feat(paypal): PayPal PPCP integration review compliance #725
Description
Summary
PayPal reviewed our PPCP integration and provided specific feedback requiring changes before partnership approval. This task covers the 5 code changes needed in this repo.
Changes Required
-
Disconnect disclaimer — Update confirm dialog to use PayPal's required wording: "Disconnecting your PayPal account will prevent you from offering PayPal services and products on your website. Do you wish to continue?"
-
Onboarding failure UI — Display PayPal's required error messages when
payments_receivableoremail_confirmedis false after OAuth onboarding. -
Block checkout for invalid merchant status — Remove paypal-rest from active gateways when merchant can't receive payments.
-
Add payee.merchant_id to orders — Include
payee.merchant_idinpurchase_unitswhen using OAuth mode. -
Log PayPal-Debug-Id headers — Capture and log the
PayPal-Debug-Idresponse header from API calls for review submission.
Files Affected
inc/gateways/class-paypal-rest-gateway.phpinc/gateways/class-paypal-oauth-handler.php
Acceptance Criteria
- Disconnect dialog shows PayPal's exact required disclaimer text
- Settings page shows error banner when payments_receivable=false
- Settings page shows error banner when email_confirmed=false
- PayPal gateway hidden from checkout when merchant status is invalid
- Orders include payee.merchant_id in purchase_units when merchant_id is set
- PayPal-Debug-Id logged from every API response
- All existing PayPal tests still pass
aidevops.sh v3.5.541 plugin for OpenCode v1.3.12 with claude-opus-4-6 spent 22m and 617 tokens on this as a headless worker.