Skip to content

Instantly share code, notes, and snippets.

@armandofox
Created December 10, 2020 00:33
Show Gist options
  • Save armandofox/2b1976e79ef3c4b6bd6bb6b8e6dd54ab to your computer and use it in GitHub Desktop.
Save armandofox/2b1976e79ef3c4b6bd6bb6b8e6dd54ab to your computer and use it in GitHub Desktop.
gem_example.rb
require "stripe" # makes gem's definitions available within this file
Stripe.api_key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
Stripe::Charge.create({
:amount => 2000,
:currency => "usd",
:source => "tok_mastercard", # obtained with Stripe.js
:description => "Charge for [email protected]"
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment