Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- begin
- customer = Stripe::Customer.create(
- :email => params[:stripeEmail],
- :source => params[:stripeToken]
- )
- Stripe::Charge.create({
- :customer => customer.id,
- :amount => @amount,
- :description => "Payment recieved from #{params[:stripeEmail]} for the payment of order id #{@order.id}",
- :currency => "usd",
- }, {:stripe_account => StripeKeysForApp.last.uid} )
- rescue Stripe::CardError => e
- flash[:error] = e.message
- redirect_to new_charge_path
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement