Skip to content

Instantly share code, notes, and snippets.

@8vius
Created July 20, 2017 23:41
Show Gist options
  • Save 8vius/e971d361df0ea89fe36f81096a735a3d to your computer and use it in GitHub Desktop.
Save 8vius/e971d361df0ea89fe36f81096a735a3d to your computer and use it in GitHub Desktop.
charge = Stripe::Charge.create(
{
source: donation.stripeToken,
amount: donation.amount_cents,
description: 'Piggybackr v2',
currency: donation.amount_currency,
statement_descriptor: statement_descriptor,
destination: {
amount: donation.amount_cents - donation.site_fee_cents,
account: fundraiser.owner.stripe_user_id
}
},
api_key: site.stripe_secret_key,
client_id: site.stripe_client_id
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment