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

3D Secure displays on card details submit, but does not update subscription #1718

Closed
johnpuddephatt opened this issue Oct 14, 2024 · 1 comment

Comments

@johnpuddephatt
Copy link

johnpuddephatt commented Oct 14, 2024

Cashier Stripe Version

15

Laravel Version

11

PHP Version

8.3

Database Driver & Version

No response

Description

I've been upgrading a site that was running Laravel 8 with Cashier 12 and as well as following the migration guides I've been testing out making payments and I've encountered an issue when creating new subscriptions.

I am using Stripe Elements on the frontend as outlined in the docs. When using a Stripe test card that requires authentication, I was seeing a 3D Secure popup after calling stripe.confirmCardSetup(), but despite clicking 'Accept' in the popup, I was left with an Incomplete subscription (confirmed in Stripe, so not a webhook issue).

As I was catching IncompletePayment exceptions when creating the subscription as recommended in the docs, the user was being shown the 3D secure prompt twice. The second one (on the cashier.payment page) was working successfully – i.e. passing the 3D Secure verification resulted in an active subscription.

The solution (or at least workaround) was to add handleActions: false to confirmCardSetup:

const { setupIntent, error } = await this.stripe.confirmCardSetup(
  this.intent.client_secret,
  {
    payment_method: {
      card: this.stripeCardElement,
      billing_details: {
        name: this.name,
        email: this.email,
      },
    },
  },
  {
    handleActions: false,
  }
);

I'm opening this issue primarily in case it helps anyone else. I believe from what I've read that setting handleActions to false should be ok as we are manually handling these actions on the subsequent page if necessary, however I'm unsure whether the initial 3D Secure popup not working is a Cashier issue or a problem with the provided front end code example.

Steps To Reproduce

Using a Stripe test card that requires verification, take card payment and create a new subscription in accordance with the Cashier docs.

@johnpuddephatt johnpuddephatt changed the title 3D Secure issue 3D Secure displays on card details submit, but does not update subscription Oct 14, 2024
@driesvints
Copy link
Member

Hey @johnpuddephatt thanks for reporting. These docs still need an overhaul. Please see #1541.

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

No branches or pull requests

2 participants