我正在使用Payeezy SDK Integration for first data payeezy github。使用他们的方法标记卡(&U):
[myClient submitPostFDTokenForCreditCard: credit_card[@"type"] cardHolderName: credit_card[@"cardholdername"] cardNumber:credit_card[@"cardnumber"] cardExpirymMonthAndYear:credit_card[@"expdate"] cardCVV:credit_card[@"cvv"] type:@"FDToken" auth:@"false" ta_token:taToken completion:^(NSDictionary *dict, NSError *error){
if (error == nil) {
NSDictionary *resDict = [dict valueForKey:@"token"];
self->fdTokenValue = [NSString stringWithFormat:@"%@", [resDict valueForKey:@"value"]];
[self authorizeToken];
}
else{
NSLog(@"error : %@",error.debugDescription);
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"First Data Payment Authorization"
message: error.localizedDescription delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];
[alert show];
}
}];其中KURL是@"https://api-cert.payeezy.com/v1/transactions/tokens“
我得到了这个错误:
error value : The operation couldn’t be completed. (NSURLErrorDomain error -1012.)
2019-02-20 14:28:53.387187+0530 AppName[28055:1980864] error value extra : Error Domain=NSURLErrorDomain Code=-1012 "(null)" UserInfo={NSErrorFailingURLStringKey=https://api.payeezy.com/v1/transactions/tokens, NSUnderlyingError=0x282075ec0 {Error Domain=kCFErrorDomainCFNetwork Code=-1012 "(null)" UserInfo={_kCFURLErrorAuthFailedResponseKey=<CFURLResponse 0x2800e3680 [0x1c3409610]>{url = https://api.payeezy.com/v1/transactions/tokens}}}, NSErrorFailingURLKey=https://api.payeezy.com/v1/transactions/tokens}它不像任何库调用之类的东西。只是这个Url抛出了错误。我也用live url进行了检查,但结果是一样的。这可能是什么原因呢?
发布于 2019-02-21 17:34:16
确保使用有效值传递所有必需的auth头字段。错误代码似乎是从API端取消了身份验证。
https://stackoverflow.com/questions/54800519
复制相似问题