Closed dimzeta closed 4 years ago
Raaah... 🤦🏻♂️
Just after I posted it I found out the webhook had some errors, I resend them and now it's working... Sorry!
Beware that if you delete the stripe_id manually from the database, there is a difference between setting it to EMTPY or NULL. If you just delete it, the DB will set it to EMPTY, and Cashier will request Stripe details with the following payload {customer: "", ...} which results in the following error: 'User is already a Stripe customer with ID .'
Notice the ID and a space after it, that's where the Stripe ID would normally go.
Description:
I'm testing Cashier with Stripe to manage plans with subscriptions, but I have an issue when I want to subscribe to a plan:
Stripe HTML code (Angular) :
Laravel API
/user/subscription
endpoint:Here I have a first error:
Trying to get property 'default_payment_method' of non-object
So I tried to get the Stripe Customer by simply call
$user->createAsStripeCustomer()
, and then I got this error:User is already a Stripe customer with ID cus_XXX
.The issue is this customer has been deleted from the Stripe Dashboard, and I can't recreate it. Cashier seems to find it, even if it's a deleted customer.