【问题标题】:Set Stripe customer id in parse cloud code在解析云代码中设置 Stripe 客户 ID
【发布时间】:2014-10-01 11:57:36
【问题描述】:

我需要帮助使用 Parse 的云代码在 Stripe 的更新客户函数中设置第一个字符串参数。我试图简单地调用我发送的带有客户 ID 的参数,但是当我尝试尝试它时,它似乎甚至无法被解析识别。这是我目前拥有的:

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");
   }

 });

});

【问题讨论】:

    标签: javascript parse-platform stripe-payments


    【解决方案1】:

    您的请求中是否包含 request.params.customeruser?

    您可以通过将其记录在解析日志中来检查 - console.log(JSON.stringify(request.params));

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-04
      • 2019-10-16
      • 2015-11-28
      • 1970-01-01
      相关资源
      最近更新 更多