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

Migration routine incompatible with current Stripe API? #18

Closed
ppmathis opened this issue Sep 17, 2019 · 1 comment
Closed

Migration routine incompatible with current Stripe API? #18

ppmathis opened this issue Sep 17, 2019 · 1 comment

Comments

@ppmathis
Copy link

The current version of the module available in this repository checks if the Stripe customer object has any active card associated using this condition:

if (isset($customer->active_card->id)) {

On our system this condition does not match a single customer using Stripe payments, as the field active_card on Stripe\Customer has been deprecated for ages back with API 2013-07-05 and replaced with cards and default_card: https://stripe.com/docs/upgrades#2013-07-05

Which then once again got changed to sources and default_source with API 2015-02-18: https://stripe.com/docs/upgrades#2015-02-18

Is it possible that this migration routine has been developed against a really old Stripe API version, as Stripe requires manually triggering an upgrade of the API version inside the customer account? In my case the following changes to stripe_payments.php have allowed the migration routine to gather the new payment source identifiers using API 2019-09-09:

168c168
<                 if (isset($customer->active_card->id)) {
---
>                 if (isset($customer->default_source)) {
172c172
<                         'reference_id' => $customer->active_card->id,
---
>                         'reference_id' => $customer->default_source,
@JReissmueller
Copy link
Member

Thanks for the feedback! Yea this was developed using a sandbox account we have so it is quite possible that the same consistency with new API version was not enforced. Would you be willing to create a bug post as well on the forums with your proposed solutions. Others may find it helpful. https://www.blesta.com/forums/index.php?/forum/22-bugs/

tysonphillips added a commit that referenced this issue Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants