0

我正在将 Payeezy SDK 集成用于第一个数据payeezy github。& 使用他们的方法标记卡:

[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正在抛出错误。我也检查了实时网址,但结果相同。这可能是什么原因?

4

1 回答 1

0

确保使用有效值传递所有必需的 auth 标头字段。错误代码似乎从 API 端取消了身份验证。

于 2019-02-21T09:34:15.563 回答