I'm trying to allow a user to add a credit card in my app using Stripe. When i call the code below (which is from the docs: https://stripe.com/docs/api#create_card), I get the error below.
Are the docs out of date or am i doing something wrong?
@card = Stripe::Customer.retrieve(current_account.stripe_id).cards.create(:card => params[:stripeToken])
undefined method `create' for #<Stripe::ListObject:...
Support for creating a card was added in version 1.8.4 of the Stripe gem. You'll need to make sure you're using that version or newer, otherwise you'll see that error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With