gpt4 book ai didi

ios - eWAY iOS SDK 出现空错误

转载 作者:行者123 更新时间:2023-11-29 12:12:08 25 4
gpt4 key购买 nike

我目前正在使用一家名为 eWAY 的公司的信用卡 SDK 编写一个 iOS 应用程序。

我试图让它在沙盒测试环境中工作,但我一直收到空错误。

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

网关:我正在使用指定的 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”错误。

我一直在联系公司,肯定是我这里做错了。有没有人对此有任何经验并且可以提供一些关于我所缺少的东西的见解?

最佳答案

只是为了更新任何正在或曾经遇到此问题的人。代码运行完美,SDK 中存在一个错误,此错误已得到修复。

关于ios - eWAY iOS SDK 出现空错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33138770/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com