1
我目前正在使用eWAY公司的一家公司使用信用卡SDK編寫iOS應用程序。
eWAY iOS SDK發生空錯誤
我試圖讓它在沙盒測試環境中工作,但我一直收到一個空錯誤。
的NSLog輸出( 「EWAY ERROR」 是我的NSLog消息的一部分)
2015-10-15 12:25:40.127 EwayTest[1351:37919] EWAY ERROR: <null>()
林字面上使用網頁上的例子:https://www.eway.com.au/developers/sdk/ios
網關: 我使用網址: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「錯誤。
我一直在與公司聯繫,這一定是我在這裏做錯了事。有沒有人有過這方面的經驗,並可以提供一些見解,以瞭解我失蹤的內容?
我面臨同樣的問題,我只是改變沙箱api生活(生產)api它解決了我的問題。 –