目前,我正在使用一家名为iOS的公司的信用卡SDK编写一个eWAY应用程序。
我试图让它在沙箱测试环境中工作,但是我一直收到一个空错误。
NSLog输出( "EWAY错误“是NSLog消息的一部分)
2015-10-15 12:25:40.127 EwayTest[1351:37919] EWAY ERROR: <null> ()我确实使用了网页上的示例:https://www.eway.com.au/developers/sdk/ios
网关:我正在使用指定的URL:https://api.sandbox.ewaypayments.com/网关。
我的代码:
- (IBAction)btnPress:(id)sender
{
Transaction *transaction = [[Transaction alloc] init];
Customer *customerObj = [[Customer alloc] init];
customerObj.Reference = @"A12345";
customerObj.Title = @"Mr.";
customerObj.FirstName = @"Nico";
customerObj.LastName = @"Vulture";
customerObj.CompanyName = @"All Web Pty Ltd";
customerObj.JobDescription = @"Developer";
customerObj.Phone = @"09 889 0986";
customerObj.Mobile = @"09 889 0986";
Address *customerAddress = [[Address alloc] init];
customerAddress.Street1 = @"Level 5";
customerAddress.Street2 = @"369 Queen Street";
customerAddress.City = @"Sydney";
customerAddress.State = @"NSW";
customerAddress.PostalCode = @"2010";
customerAddress.Country = @"au";
customerObj.Address = customerAddress;
CardDetails *cardDetails = [[CardDetails alloc] init];
cardDetails.Name = @"Nico Vulture";
cardDetails.Number = @"378282246310005";
cardDetails.ExpiryMonth = @"10";
cardDetails.ExpiryYear = @"19";
cardDetails.CVN = @"836";
customerObj.CardDetails = cardDetails;
transaction.Customer = customerObj;
//payment
Payment *payment = [[Payment alloc] init];
payment.Payment = 100;
payment.InvoiceNumber = @"Inv 21540";
payment.InvoiceDescription = @"Individual Invoice Description";
payment.InvoiceReference = @"513456";
payment.CurrencyCode = @"AUD";
transaction.Payment = payment;
//Make payment
[RapidAPI submitPayment:transaction completed:^(SubmitPaymentResponse *submitPaymentResponse) {
if(submitPaymentResponse.Status == Accepted)
{
NSLog(@"EWAY: Accepted");
}
else if (submitPaymentResponse.Status == Success)
{
// The API Call completed successfully.
NSLog(@"EWAY: Success");
}
else if(submitPaymentResponse.Status == Error)
{
// An error occurred with the API Call.
[RapidAPI userMessage:submitPaymentResponse.Errors Language:@"EN" completed:^(UserMessageResponse *userMessageResponse) {
NSString *msg = [NSString stringWithFormat:@"%@ \n %@",userMessageResponse.Errors, userMessageResponse.Messages];
NSLog(@"EWAY ERROR: %@",msg);
}];
}
}];
}但是,我注意到当我更改网关(URL) https://api.ewaypayments.com/DirectPayment.json时,我得到的错误输出为:
EWAY ERROR: S9990
(null)如网站上所示,“库没有初始化终结点,也没有初始化到URL”错误。
我和公司有联系,一定是我做错了什么。有没有人有过这方面的经验,并能提供一些关于我错过的东西的洞察力?
发布于 2015-10-24 05:20:49
只是为了更新任何正在或正在经历这个问题的人。代码工作得很好,在SDK中有一个bug已经修复了。
https://stackoverflow.com/questions/33138770
复制相似问题