Created
February 1, 2015 19:45
-
-
Save vikdenic/837d7bf5e8516f1d18df to your computer and use it in GitHub Desktop.
May Stripe Before mailfun order stuff
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
| 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