Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uses stripe.handleNextAction for payment intents #908

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrissrogers
Copy link
Member

@chrissrogers chrissrogers commented Nov 21, 2024

For some payment methods handle their PaymentIntent.next_action by redirecting the user and then returning them to the checkout.

When this occurs, we shall require the three_d_secure_action_token_id be provided upon return, as follows:

const risk = recurly.Risk();
const threeDSecure = risk.ThreeDSecure({
  actionTokenId: myActionTokenId
});
threeDSecure.on('token', function (token) {
  // handle passing the action result
  // token back to your server

  // token.type => 'three_d_secure_action_result'
  // token.id

  // optionally, you may call threeDSecure.remove() to remove the element
});

threeDSecure.attach(document.querySelector('#my-auth-container'));

This change will handle re-submission of the action token, and determine if the Payment Intent has already been confirmed. If it is confirmed, then an action result token will be generated.

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

Successfully merging this pull request may close these issues.

2 participants