add stripe 3ds support - #1450
Open
pbennett1-godaddy wants to merge 1 commit into
Open
Conversation
🦋 Changeset detectedLatest commit: 24015a9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds backward-compatible Stripe 3DS support to the React checkout card flow.
When checkout confirmation returns a valid
PAYMENT_ACTION_REQUIREDGraphQL error from checkout-api, the frontend now:stripe.handleNextActionwith the returned client secret.Stripe next actions are only invoked when the response contains the complete expected contract:
code = PAYMENT_ACTION_REQUIREDpaymentResult.status = ACTION_REQUIREDpaymentResult.provider = STRIPEnextStep.type = SDK_ACTIONnextStep.sdk = STRIPE_JSnextStep.action = HANDLE_NEXT_ACTIONnextStep.clientSecretExisting payment success and error behavior remains unchanged for older checkout-api responses, non-Stripe providers, and malformed action-required responses. Stripe failures and repeated
action-required responses fail safely and unlock checkout without entering a retry loop.
The Stripe card button also uses the local payment-processing state to prevent duplicate submissions during tokenization and 3DS authentication.
Changeset
Added a patch changeset for
@godaddy/react.Test Plan
paymentResult.nextStep, are preserved.stripe.handleNextActionwith the client secretpi_*PaymentIntent IDpnpm --dir packages/react typecheckpnpm --dir packages/react testResult: 58 test files passed, 578 tests passed.
git diff --check