Skip to content

Instantly share code, notes, and snippets.

@iDiogenes
Created July 17, 2014 20:56
Show Gist options
  • Save iDiogenes/b49d84f6377b67ec3341 to your computer and use it in GitHub Desktop.
Save iDiogenes/b49d84f6377b67ec3341 to your computer and use it in GitHub Desktop.
charge = Stripe::Charge.create({
amount: @order.total_in_cents,
card: @order.stripe_card_token,
currency: "usd",
description: "Org: #{@org.name}, Plan: #{@plan.name}",
application_fee: @order.total_in_cents.percent_of(@org.percent_amount)
}, @org.stripe_oauth_token)
@order.stripe_charge_identifier = charge.id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment