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

Unable to re-register a User in Laravel because of previous Customer record #281

Open
devinfd opened this issue Sep 24, 2024 · 0 comments
Open
Assignees

Comments

@devinfd
Copy link

devinfd commented Sep 24, 2024

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

  1. Register a user in a Laravel application using Laravel/cashier-paddle.
  2. Delete the user and mark them as archived in Paddle.
  3. Try to register that user again in the Laravel Application.

I would be happy to submit a PR if this is acceptable.

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