I'm getting this error:
Stripe::InvalidRequestError in OrdersController#create
You must supply either a card or a customer id
charge = Stripe::Charge.create(
:amount => (@order.amount * 100).floor,
:currency => "usd",
:card => token
with charge = Stripe::Charge.create( highlighted
I've checked and I think I set up everything like the tutorial.
Interestingly, if I hit back after I get the error and re-submit the form, it works fine.
This happens every time; one error, hit back, works fine.
I've looked all over but haven't found a solution. Would really appreciate some guidance.
Posted over 5 years ago by