Skip to content
This repository has been archived by the owner on Oct 16, 2018. It is now read-only.

Subscriptions broken w/latest Stripe gem #96

Closed
peburrows opened this issue Mar 1, 2015 · 1 comment · Fixed by #97
Closed

Subscriptions broken w/latest Stripe gem #96

peburrows opened this issue Mar 1, 2015 · 1 comment · Fixed by #97

Comments

@peburrows
Copy link
Contributor

When using Payola with the latest version of the stripe gem (1.20.1), the StartSubscription.run method throws the following exception:

NoMethodError: undefined method 'cards' for #<Stripe::Customer:...>

The offending code is on line 30 of the StartSubscription class.

It seems at some point Stripe removed the Stripe::Customer#cards method and replaced it with Stripe::Customer::#sources. Changing the offending line to call the #sources method instead seems to fix things for me for me, but I haven't had a chance to run the full test suite to ensure that it doesn't break something else.

@peterkeen
Copy link
Collaborator

You can fix this (temporarily) with by adding this code in your payola initializer:

Stripe.api_version = "2015-02-16"

See #93 for details on why this is happening.

peterkeen added a commit that referenced this issue Mar 1, 2015
Note that this *forces* API version 2015-02-18. If you have non-Payola
code using the Stripe gem you will have to update it.

Fixes #93
Fixes #96
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants