-
Notifications
You must be signed in to change notification settings - Fork 48
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
Live environment fails when test customer is used #311
Comments
This is also an issue when trying to save payment methods using |
Hi, we have also just run into this issue. We're using Craft 4.10.2, Commerce 4.6.4, Stripe for Craft Commerce 4.1.5, and PHP 8.1.29. User accounts that have placed orders on the staging site and Stripe test mode previously are showing the error that @ryssbowh has reported above on the live site in Stripe live mode. Is carrying out the suggested fix above safe, and also what @lukeholder recommends doing as a workaround for now? Or is a proper fix imminent?
Thanks, Stephen |
This is also an issue when you remove the customers from the test environment on Stripe and using Live Keys. I think a simple solution would be to store in the Switching then back and forth would also not require any adjustments in the stripe environment. |
Hi all This is a common issue with carrying over test data into the live environment as the data that is stored in Stripe is completely separate. If you are importing data into your production site when you are about to go live it is wise to use the This is also a useful command when pulling a production DB to work on locally, you can run the command on your local dev to remove the references to the live Stripe environment. Hope this helps, thanks! |
Hi Nathaniel, thanks for posting back about this. What is the best way to remove test Stripe data from a live database, without wiping live data? As an example, we have a client that had a front-end rebuild and was using a private 'beta' version of the website for testing, prior to launch. We weren't aware of the The original poster said in the first message:
Is this the best workaround to use in our situation? I just wanted to double-check before deleting anything from the database, in case there were any knock-on effects to this that we weren't aware of. Thanks. |
Description
We have a website just gone live (migrated from Craft 3) where payments are failing for admin users. Those users have been making payments on the dev version of the website and in Stripe they are linked to a test environment. Stripe complains :
Could not fetch Stripe customer: No such customer: 'cus_Ge1tS7lpPzAWCK'; a similar object exists in test mode, but a live mode key was used to make this request
The only thing I can do is deleting the record in the stripe_customers table and it fixes the issue.
Shouldn't stripe customers be environment aware ? or should we have a way to delete those references in Craft itself ?
Thank you
Steps to reproduce
Additional info
The text was updated successfully, but these errors were encountered: