Skip to content

Instantly share code, notes, and snippets.

@peterj
Created November 20, 2017 00:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterj/da46d388d5d92d0199fc7f7249b62847 to your computer and use it in GitHub Desktop.
Save peterj/da46d388d5d92d0199fc7f7249b62847 to your computer and use it in GitHub Desktop.
const STRIPE_KEY="sk_test_STRIPE_KEY";
const configureStripe = require('stripe');
const stripe = configureStripe(STRIPE_KEY);
stripe.charges.create(req.body, function (err, res) {
if (err) {
context.res = { status: 400, body: err};
} else {
context.res = { status: 200, body: res };
}
context.done();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment