Skip to content

Instantly share code, notes, and snippets.

@leopard627
Created May 17, 2017 02:30
Show Gist options
  • Save leopard627/a011a67cb27c67e029095c1cb0d00137 to your computer and use it in GitHub Desktop.
Save leopard627/a011a67cb27c67e029095c1cb0d00137 to your computer and use it in GitHub Desktop.
stripe example
import stripe
stripe.api_key = 'tGN0bIwXnHdwOa85VABjPdSn8nWY7G7I'
print "Attempting charge..."
resp = stripe.Charge.create(
amount=200,
currency='usd',
card={
'number': '4242424242424242',
'exp_month': 10,
'exp_year': 2014
},
description='[email protected]'
)
print 'Success: %r' % (resp, )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment