Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. # Create a Customer:
  2. customer = Stripe::Customer.create(
  3. :email => user.email,
  4. :source => token,
  5. )
  6.  
  7. # Charge the Customer instead of the card:
  8. charge = Stripe::Charge.create(
  9. :amount => price,
  10. :currency => "usd",
  11. :description => customer_message,
  12. :customer => customer.id,
  13. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement