如何将此javascript数据转换为ios兼容数据并将其放入字典中,当我执行类似newCustomer [“cvc_check”]之类的操作时,我得到一个零,我试图从解析PFCloud.callFunctioninBackground中获取数据这是调用 stripe.com api 来获得这些结果
func hasToken(token: STPToken!) {
var parameters = ["cardToken":token.tokenId,
"objectId":PFUser.currentUser().objectId]
PFCloud.callFunctionInBackground("createCustomer", withParameters:parameters) {
(results: AnyObject!, error: NSError!) -> Void in
if !error {
var newCustomer = results as Dictionary<String, AnyObject>
println(newCustomer["cvc_check"]) // This gives me a nil
self.successfulPayment()
} else {
let message = error.userInfo["error"] as NSString
self.hasError("\(message) Please try agains.")
}
}