Parse platform 客户对象保存在解析/条带中的什么位置

Parse platform 客户对象保存在解析/条带中的什么位置,parse-platform,stripe-payments,Parse Platform,Stripe Payments,我能够使用Parse Cloud模块成功创建客户对象。既然创建了这个customer对象,那么如何获取它应该返回的customer id呢?这是我的密码: Parse.Cloud.define("createCustomer", function(request, response) { Stripe.Customers.create({ account_balance: 0, email: request.params.email,

我能够使用Parse Cloud模块成功创建客户对象。既然创建了这个customer对象,那么如何获取它应该返回的customer id呢?这是我的密码:

Parse.Cloud.define("createCustomer", function(request, response) {    
  Stripe.Customers.create({
        account_balance: 0,
        email: request.params.email,
        description: 'new stripe user',
        metadata: {
           name: request.params.name,
           userId: request.params.objectId, // e.g PFUser object ID
           createWithCard: false
           }
         }, {
            success: function(httpResponse) {
                 response.success("success");
            },
            error: function(httpResponse) {
                 console.log(httpResponse);
                 response.error("Cannot create a new customer.");
             }
      });

}))

httpResponse实际上返回整个客户。如果您只需要客户ID,请使用以下命令:

httpResponse["id"]
如果您只想将整个客户返回给调用该函数的任何对象,只需在响应中返回即可。成功:

response.success(httpResponse);
请参阅本文:在这个响应中,customerId设置在哪里?