lib/pay/stripe/billable.rb
def create_stripe_charge(amount, options={})
        args = {
          amount: amount,
          currency: 'usd',
          customer: customer.id,
          description: customer_name,
        }.merge(options)

        stripe_charge = ::Stripe::Charge.create(args)

        # Save the charge to the db, returns Charge
        Pay::Stripe::Webhooks::ChargeSucceeded.new.create_charge(self, stripe_charge)
      rescue ::Stripe::StripeError => e
        raise Error, e.message
      end
# Handles Billable#charge
#
# Returns Pay::Charge
Handles Billable#charge
Returns Pay::Charge
Handles Billable#charge Returns Pay :: Charge
def create_stripe_charge(amount, options={})
        args = {
          amount: amount,
          currency: 'usd',
          customer: customer.id,
          description: customer_name,
        }.merge(options)
        stripe_charge = ::Stripe::Charge.create(args)
        Pay::Stripe::Webhooks::ChargeSucceeded.new.create_charge(self, stripe_charge)
      rescue ::Stripe::StripeError => e
        raise Error, e.message
      end
def create_stripe_charge ( amount , options = { } ) args = { amount : amount , currency : 'usd' , customer : customer . id , description : customer_name , } . merge ( options ) stripe_charge = :: Stripe :: Charge . create ( args ) Pay :: Stripe :: Webhooks :: ChargeSucceeded . new . create_charge ( self , stripe_charge ) rescue :: Stripe :: StripeError => e raise Error , e . message end
Handles Billable#charge
Returns Pay::Charge
Handles Billable#charge Returns Pay :: Charge
# Save the charge to the db, returns Charge
amount
options