Using stripe subscriptions

If I had followed your etsy demo and wanted to enable subscriptions with stripe on this do you have any suggestions where I could start with this?

Posted about 5 years ago by Emma
Posted about 5 years ago by Emma

I have since resolved this! I found it easier to create an entirely new subscriptions model and controller. Might be something worth covering in a course i found the stripe docs quite hard to follow though a good starting point. I also found the rails cast quite tricky because its not rails 4 and misses some of the initial groundwork! That said it is also a great pointer so thanks!

0
Posted about 5 years ago by Emma

So i have still not had any joy with this and think somewhere along the lines i have messed up with controllers? would you be able to take a look and see what you think. https://gist.github.com/Em01/5745ca162604ff07dffa
The current error i am getting is as follows Stripe::InvalidRequestError in OrdersController#create
You must supply either a card or a customer id

The payment is going through on stripe...

0
Posted about 5 years ago by Emma

Thanks! Yes i read the documentation but somewhere along the lines something has gone wrong! I will get in touch again if i still have had no joy and can be more prescise about it!

0
Posted about 5 years ago by Alex Yang

I recommend reading the section of the Stripe documentation on subscriptions (https://stripe.com/docs/api#subscriptions). I also wrote up some information here: https://baserails.com/questions/56. A lot of this depends on what exactly you're trying to do, but hopefully these resources will be a good starting point!

0