You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was getting a Paddle Customer already exists in the database error which didn't make sense to me. In my case the user was archived in Paddle. With the current code logic it seems that if a user cancels their account and their Paddle status becomes archived then that user can't return to the "service" as user again with the same email address?
Why is a LogicException thrown in ManagesCustomer@createAsCustomer? The doc blocks for createAsCustomer don't indicate that an exception will be thrown. Shouldn't the $customer object just be returned if one is found matching the Paddle ID? Then make an API PUT request to update the user status to 'active' if they are archived?
If you have a user canceling their account and returning with the same email address then you should either restore their original user account or make sure the old paddle customer record isn't in the database anymore.
We need the unique paddle_id on the paddle customer table because it's a foundation of how the package works and maps subscriptions to it. It also doesn't makes sense to connect a paddle customer record to multiple users. One paddle customer record matches a single user.
@driesvints thank you, that makes sense. Just one follow up question: In addition to deleting the Customer if the user cancels their account, is it also advisable to keep the User and Customer models in sync? ie: if the User's name or email changes then the Customer modelname/email should change as well?
No these don't necessarily need to be the same. The email and name column on the customer record reflect's what's in paddle. You could have separate legal/billing name and email for invoicing and a separate email/name for your billable.
For example, You're Devin and your company is named Acme company with [email protected]
Cashier Paddle Version
2.5.2
Laravel Version
11.23.5
PHP Version
8.3.11
Database Driver & Version
SingleStore
Description
Related to #274
I was getting a
Paddle Customer already exists in the database
error which didn't make sense to me. In my case the user was archived in Paddle. With the current code logic it seems that if a user cancels their account and their Paddle status becomes archived then that user can't return to the "service" as user again with the same email address?Why is a LogicException thrown in
ManagesCustomer@createAsCustomer
? The doc blocks for createAsCustomer don't indicate that an exception will be thrown. Shouldn't the$customer
object just be returned if one is found matching the Paddle ID? Then make an API PUT request to update the user status to 'active' if they are archived?Steps To Reproduce
I would be happy to submit a PR if this is acceptable.
The text was updated successfully, but these errors were encountered: