Class: StripePayment::Charge
- Inherits:
-
Object
- Object
- StripePayment::Charge
- Defined in:
- lib/stripe_payment.rb
Class Method Summary collapse
Class Method Details
.create(amount, token, description) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/stripe_payment.rb', line 20 def self.create(amount, token, description) Stripe::Charge.create( amount: (amount.to_f * 100).to_i, # Convert to cents currency: "usd", source: token, description: description ) end |