laravel / cashier-stripe

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.
https://laravel.com/docs/billing
MIT License
2.39k stars 680 forks source link

Issue related to stripe_id in table users #1726

Closed sonvlh closed 4 days ago

sonvlh commented 4 days ago

Cashier Stripe Version

v14.12.10

Laravel Version

v10.25.2

PHP Version

8.2.13

Database Driver & Version

No response

Description

Hi Team,

I am using Cashier to integrate Stripe as a payment solution. I encountered an issue where, after testing features using the test key pair, I switched my environment to live. However, the stripe_id value in the users table does not refresh. As a result, when I attempt a payment in the live environment, it references the stripe_id from the test environment, causing an issue.

I think you should separately use stripe_id by key pair instead of attaching directly into users table.

Thank you.

Steps To Reproduce

You can firstly using test key pair to test payment feature, then switch into live key to payment and it throw an error that cus_... does not exist.

crynobone commented 4 days ago

Don't believe Cashier was ever designed to work that way.

crynobone commented 4 days ago

Hi there,

Thanks for reporting the problem you are encountering, but it looks like this is a question which may be better suited for a support channel. We only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repository you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.

sonvlh commented 4 days ago

Hi there,

Thanks for reporting the problem you are encountering, but it looks like this is a question which may be better suited for a support channel. We only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repository you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.

Thanks for replying me. I think in general it should consider to be a bug because when you delivery on a product company, all customers that use this product need to verify if it really works before they can go live, then this case will happen as i reported above.

sonvlh commented 4 days ago

Don't believe Cashier was ever designed to work that way.

You should believe because i already checked the code and it works like that. I think in general the stripe_id should be pair with the key pair and users in anothet table. Not directly in users table.

driesvints commented 3 days ago

You can't copy your test data to a live environment and expect it to work sorry. Start from fresh on a live environment.