我需要帮助使用Parse的云代码在Stripe的更新客户功能中设置第一个字符串参数。我试着简单地用我的客户ID调用我发送的参数,但是当我尝试尝试时,它似乎甚至不被解析识别。这是我现在拥有的:
Parse.Cloud.define(" updatecustomer",function(request,response){
var Stripe = require(' stripe'); Stripe.initialize(' sk_test _ #######&#39);
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");
}
});
});
答案 0 :(得分:0)
您是否在请求中收到request.params.customeruser?
你可以通过在解析日志中记录它来检查 - 的console.log(JSON.stringify(request.params));