Created
December 10, 2020 00:33
-
-
Save armandofox/2b1976e79ef3c4b6bd6bb6b8e6dd54ab to your computer and use it in GitHub Desktop.
gem_example.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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