Skip to content

feat(payment): PAYPAL-6634 Improve Error Messaging for Bank-Declined 3DS Authentication (PayPal PPCP) - #3378

Open
bc-pavlo-khodakivskyi wants to merge 1 commit into
masterfrom
PAYPAL-6634
Open

feat(payment): PAYPAL-6634 Improve Error Messaging for Bank-Declined 3DS Authentication (PayPal PPCP)#3378
bc-pavlo-khodakivskyi wants to merge 1 commit into
masterfrom
PAYPAL-6634

Conversation

@bc-pavlo-khodakivskyi

@bc-pavlo-khodakivskyi bc-pavlo-khodakivskyi commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

What/Why?

Improve Error Messaging for Bank-Declined 3DS Authentication (PayPal PPCP)

Rollout/Rollback

Revert

Testing

Screen.Recording.2026-08-27.at.13.03.24.mov
Screen.Recording.2026-08-27.at.13.00.51.mov

Note

Medium Risk
Changes payment failure handling and shopper-facing errors on the PayPal PPCP 3DS path; scope is limited to specific liability-shift outcomes but affects live checkout behavior.

Overview
Adds PaymentMethodBankDeclinedAuthenticationError (type: bank_declined_authentication) so checkout can tell shoppers their bank declined 3DS and they should try another card, instead of a generic failure.

For PayPal Commerce credit cards, when Card Fields onApprove reports liabilityShift NO or UNKNOWN, the strategy throws that error. Because the PayPal SDK swallows errors from onApprove and rejects submit() with its own error, the strategy sets a flag and re-throws the bank-declined error from submitHostedForm; other submit failures still map to PaymentMethodFailedError (“Failed authentication…”). Unit tests cover onApprove, the SDK swallow/reject path, and the generic fallback.

Reviewed by Cursor Bugbot for commit 43b8397. Bugbot is set up for automated code reviews on this repo. Configure here.

@bc-pavlo-khodakivskyi
bc-pavlo-khodakivskyi requested a review from a team as a code owner August 27, 2026 10:15
@andriiVitvitskyi1990

Copy link
Copy Markdown
Contributor

cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

1 issue from previous review remains unresolved.

Fix All in Cursor

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 671fe69. Configure here.

@bc-pavlo-khodakivskyi

Copy link
Copy Markdown
Contributor Author

✅ Bugbot reviewed your changes and found no new issues!

1 issue from previous review remains unresolved.

Fix All in Cursor

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 671fe69. Configure here.

@cursor review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants