-
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
Deleted payment source isn’t removed from Stripe #32
Comments
Are you confusing the environments on Stripe, perhaps? Make sure you're checking the same (test/live) logs that your gateway is set to. |
The log was being filtered out in the default view in my Stripe dashboard. It's showing a GET request to Using the Stripe API reference and CURL I'm able to remove the card using the following:
Which then logs a DELETE request to |
Huh. Can you make sure that the GET request appears when you're attempting to delete a source? Assuming that this is on a server where it's impossible to provide access - can you check somehow if an exception is being thrown here: https://github.com/craftcms/commerce-stripe/blob/develop/src/gateways/Gateway.php#L363 and if so, what's the message? |
There is an error thrown there: The source was added using The logs in Stripe show the source being created then set to the default card for the user. I can verify that the source is attached to the customer in Stripe. Then when I remove the card using I don't have this on a public server yet, but I will in the next day or so. |
Okay, so Stripe fetches the source and tries to detach it. And it complains that it's not attached to a customer object. When you check in the dashboard, can you see that the source is still attached to the customer? That's strange. Is this all in Stripe test mode? Can you check that the customer id corresponds to the customer found in your |
This is in Stripe test mode. I started logging the token so I could make sure it matched up the with The userId in the Below is the source logged in deletePaymentSource. It looks like Still working on getting this on a server.
|
Any updates on this? Is this still happening? |
Yes, this is still happening. I have it on a dev server now. I can also recreate by adding a card using the default shop templates that come with Commerce and adding a card and then removing it. Additional info
|
Is it possible to send over CP and FTP access to [email protected]? Unable to reproduce this at all on my end. Should be able to query Stripe's end of things just by using the test keys set up for the Stripe gateway. |
Yes, not a problem! Just sent it over with links to test templates and steps to reproduce. |
It appears my issue was caused by using a restricted key w/ the Stripe API. Even with all permissions available it appears there are some areas of the API that are unavailable. Replacing the restricted key with a secret key allows payment sources to be deleted from customers as expected. |
Description
When deleting a payment source from a front-end form, the payment source is removed from Craft, but not from the customer on Stripe.
Steps to reproduce
commerce/payment-sources/delete
craft_commerce_paymentsources
table, but customer info is not updated at Stripe and no request appears in the developer logs in the Stripe dashboardAdditional info
The text was updated successfully, but these errors were encountered: