I get an error which I have never seen when trying to retrieve the customers stripe information. The error 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 code
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){
}
}