I need help setting the first string parameter in Stripe's update customer function using Parse's cloud code. I tried to simply call the the parameter that I am sending in with the customer id but that does not seem to be even recognized by parse when I attempt to try it. Here is what I currently have:
Parse.Cloud.define("updatecustomer", function(request, response) {
var Stripe = require('stripe'); Stripe.initialize('sk_test_#######');
Stripe.Customers.update(
request.params.customeruser //it does not seem to be picking up this line
,{
card: request.params.card,
email: request.params.email,
description: request.params.descriptionuser
},{
success: function(httpResponse) {
response.success(httpResponse);
},
error: function(httpResponse) {
response.error("Uh oh, something went wrong");
}
});
});
are you getting request.params.customeruser in your request?
you can check that by logging it in the parse logs - console.log(JSON.stringify(request.params));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.