使用条带API时为什么会出错?

时间:2016-03-09 18:21:37

标签: ios swift stripe-payments cloud-code

我收到一个错误,这是我在尝试检索客户条带信息时从未见过的。错误type: "invalid_request_error" message: "This action requires additional privileges"

Cloud Code

var Stripe = require('stripe');
Stripe.initialize('sk_test_xxxxxxxx');
Parse.Cloud.define("Test", function(request, response){
Stripe.Customers.retrieve(request.params.customerId).then(function(results) {
 response.success(results.sources)
},
function(error){
response.error(error);
   });
});

ios代码

if let stripecustomer = object["StripeCustomer"] as? String{
            print("stripec \(stripecustomer)")
            PFCloud.callFunctionInBackground("Test", withParameters: ["customerId" : stripecustomer]) { (success: AnyObject?, error: NSError?) -> Void in
                if(error == nil){
   }
}

0 个答案:

没有答案