RailsApps / rails-stripe-membership-saas

An example Rails 4.2 app with Stripe and the Payola gem for a membership or subscription site.
http://railsapps.github.io/rails-stripe-membership-saas
1.14k stars 232 forks source link

Where is the code that makes the stripe charge? #27

Closed webmagnets closed 11 years ago

webmagnets commented 11 years ago

Where is the code that makes the Stripe charge?

https://stripe.com/docs/tutorials/charges

At the above url, Stripe outlines how to make the charge with code like this:

Stripe.api_key = "sk_test_kitfpjqhAw3MFK24FFxFuPep"

token = params[:stripeToken]

charge = Stripe::Charge.create( :amount => 1000, # amount in cents, again :currency => "usd", :card => token, :description => "payinguser@example.com" )

DanielKehoe commented 11 years ago

The tutorial for the rails-stripe-membership-saas application explains how we make the Stripe charge: http://railsapps.github.com/tutorial-rails-stripe-membership-saas.html

The tutorial on the Stripe site is very different. It doesn't use the Stripe JavaScript library as we do.