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

"No Such Customer" on new installation in existing / active Commerce sites #302

Open
cherrykoda opened this issue May 18, 2024 · 3 comments

Comments

@cherrykoda
Copy link

cherrykoda commented May 18, 2024

Description

When adding Stripe to an existing Craft Commerce v4 site, existing users who have an order history cannot checkout due to a stripe error regarding their customer ID not existing in Stripe. The Stripe Customers table is understandably empty following installation, but the payment element returns an error about the customer not being found in Stripe.

image

This screenshot is using the Craft example templates, unmodified. Sidebar omitted for user data privacy.

For new users / guests / those without any orders, they correctly get the Stripe payment element

image

Stripe support pointed to the Commerce Plugin as being the issue. The expectation here would be for the Commerce Plugin to handle the payment gateway of a user that doesn't exist in Stripe as a new Stripe customer, without removing the Craft Order history that's already in the system.

Also - I have confirmed this same issue with another Craft developer who encountered the same. Discord link here to brief discussion: https://discord.com/channels/456442477667418113/666747438794670140/1241324249474404442

Steps to reproduce

  1. Take a v4 Commerce Site that has successful transactions on a non-Stripe gateway (Braintree in our case)
  2. Add the Stripe Commerce plugin using standard setups
  3. Hardcode the gateway at checkout to be the Stripe gateway
  4. Login as a Customer that has already ordered before
  5. Attempt to checkout, error appears on payment element

Additional info

  • Craft CMS version: 4.6.0
  • Stripe for Craft Commerce version: 4.1.2.2
  • PHP version: 8.2.15
  • Database driver & version: MySQL 8.0.33
  • Plugins & versions:

image

@hassanmah
Copy link

Hey, I also encountered the same issue but I saw the issue when switching from Stripe test environment to live

I also noticed the accounts we were using when Stripe test keys were being used, would come back as "customer doesn't exist" in Stripe when using live keys.

I managed to fix this by removing everything from the stripe_customers table.

But like @cherrykoda when I registered a new account in Craft, it worked ok

@cherrykoda cherrykoda changed the title "Customer Does Not Exist" on new installation in existing / active Commerce sites "No Such Customer" on new installation in existing / active Commerce sites May 18, 2024
@bliswebagency
Copy link

bliswebagency commented Jun 3, 2024

We are also seeing the same problem here after upgrading to Commerce 4 using test credit details.

Screenshot 2024-06-03 at 5 24 28 PM

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

No branches or pull requests

3 participants