Skip to content

Instantly share code, notes, and snippets.

@samcorcos
Last active May 31, 2016 08:28
Show Gist options
  • Save samcorcos/8de2ae96eda029551af118063cd0f138 to your computer and use it in GitHub Desktop.
Save samcorcos/8de2ae96eda029551af118063cd0f138 to your computer and use it in GitHub Desktop.
updated stripecharge.js for customer charge
var stripe = require("stripe")("sk_test_lcuMG0QtsEvpQXaI6B8ExZ4j");
exports.charge = function(token, amount) {
var charge = stripe.charges.create({
amount: amount,
currency: "usd",
source: token.id,
description: "Example charge"
})
}
exports.subscribe = function(token, amount) {
console.log("Subscribed");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment