2015-10-15 34 views
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“错误。

我一直在与公司联系,这一定是我在这里做错了事。有没有人有过这方面的经验,并可以提供一些见解,以了解我失踪的内容?

+0

我面临同样的问题,我只是改变沙箱api生活(生产)api它解决了我的问题。 –

回答

1

只是为了更新任何正在或正在经历此问题的人。该代码完美地工作在SDK中已经修复了一个bug。