Skip to content

Instantly share code, notes, and snippets.

@vikdenic
Created February 1, 2015 19:45
Show Gist options
  • Select an option

  • Save vikdenic/837d7bf5e8516f1d18df to your computer and use it in GitHub Desktop.

Select an option

Save vikdenic/837d7bf5e8516f1d18df to your computer and use it in GitHub Desktop.
May Stripe Before mailfun order stuff
Parse.Cloud.define("charge", function(request, response) {
console.log("test");
Stripe.Charges.create({
amount: request.params.amount, // in cents
currency: request.params.currency,
card: request.params.token
},{
success: function(httpResponse) {
response.success("Purchase made!");
},
error: function(httpResponse) {
response.error("Uh oh, something went wrong");
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment