Skip to content Skip to sidebar Skip to footer

Error When Creating Charge With Parse.com Stripe Api

I'm trying to create a charge with a test account on stripe. Here is my parse cloud function: Parse.Cloud.define('charge', function(request, response) { var Stripe = require('st

Solution 1:

@user3707419 I get the same error when trying to add a customer. Comment out that line and instead add the following:

 card: stripeToken //this is the token you generated

Also, if that doesn't work, you need to revert you parse cloud code version to 1.5.0 (you are probably running the latest version 1.6.0 which does not work. The way you do this is type the following into your console:

parse jssdk 1.5.0

All of my working code on version 1.5.0 is located at this post: Complete working Stripe + Parse.com working code on version 1.5.0

We may have to revert back even further to get customer: customer.id working I'm not sure. Let me know if you figure a different solution out. Hope this helps.

Solution 2:

For what it's worth, your code looks very similar to my cloud code that works. However, I do not have a semicolon after the first }). Just after the final one. If that's not the error, then i'm not very sure how to interpret your errors because i cannot see the code at the mentioned lines. Best of luck

Solution 3:

Just so you know the real reason: Parse removed underscore lib , stripe.js thats built into parse cloud code relied on it. Hence failure like this.

Parse 1.6.X no longer supports modules, they removed them from API doc as well.

Post a Comment for "Error When Creating Charge With Parse.com Stripe Api"