我收到一个错误,这是我在尝试检索客户条带信息时从未见过的。错误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){
}
}