t523: feat(paypal): PayPal PPCP integration review compliance#726
t523: feat(paypal): PayPal PPCP integration review compliance#726superdav42 merged 1 commit intomainfrom
Conversation
- Update disconnect dialog to use PayPal's required disclaimer text - Show error banners when payments_receivable=false or email_confirmed=false after OAuth - Block paypal-rest from active gateways when merchant status is invalid - Add payee.merchant_id to purchase_units when connected via OAuth - Log PayPal-Debug-Id header from every API response Closes #725
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe changes implement PayPal PPCP integration compliance requirements by modifying merchant status handling in OAuth callbacks to always persist validation flags, adding checkout gating based on merchant verification, and enhancing API response logging with PayPal debug identifiers. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant OAuth as PayPal OAuth Handler
participant Gateway as PayPal REST Gateway
participant Settings as Settings Storage
participant Checkout as Checkout Flow
User->>OAuth: Complete OAuth authorization
OAuth->>OAuth: Extract paymentsReceivable & emailConfirmed
OAuth->>Settings: Persist merchant status flags (default true)
OAuth->>OAuth: Log completion with status flags
alt Both flags true
OAuth->>User: Show success notice
else paymentsReceivable false
OAuth->>User: Show error notice
else emailConfirmed false
OAuth->>User: Show error notice
end
Checkout->>Gateway: Get active gateways
Gateway->>Gateway: Check merchant status validity
alt Invalid merchant status
Gateway->>Checkout: Remove PayPal gateway
else Valid status
Gateway->>Checkout: Include PayPal gateway
end
User->>Checkout: Browse payment methods
Checkout->>User: Display available gateways
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
|
Performance Test Results Performance test results for a249148 are in 🛎️! Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown. URL:
|
|
Completed via PR #726, merged to main. Merged by deterministic merge pass (pulse-wrapper.sh). No worker summary was available — the worker either crashed before writing one or this PR predates the merge summary convention. |
Summary
Implements all 5 PayPal PPCP compliance requirements identified in issue #725.
Acceptance Criteria
payments_receivable=falseoremail_confirmed=falsepayee.merchant_idadded topurchase_unitsin OAuth modePayPal-Debug-Idlogged from every API responseChanges
All changes are in a single commit (
25ede3f1) on top ofmain. No conflicts with the Amazon SES integration (GH#723) — different files.Tests
PayPal test files exist at:
tests/WP_Ultimo/Gateways/PayPal_REST_Gateway_Test.phptests/WP_Ultimo/Gateways/PayPal_OAuth_Handler_Test.phptests/WP_Ultimo/Gateways/PayPal_Webhook_Handler_Test.phptests/WP_Ultimo/Gateways/Base_PayPal_Gateway_Test.phpWP test environment required to run (
bin/install-wp-tests.sh).Closes #725
aidevops.sh v3.5.554 plugin for OpenCode v1.3.0 with claude-sonnet-4-6 spent 14h 12m and 13,232 tokens on this as a headless worker.
Summary by CodeRabbit
Release Notes
Bug Fixes
Improvements