Ios 客户';s的帐单信息未显示在Authorize.Net中
我正在我的应用程序中实施授权.Net付款方式。它的工作很好,成功完成付款后,我无法将用户的详细信息发送到付款服务器。 我在事务处理后收到的成功邮件显示空值Ios 客户';s的帐单信息未显示在Authorize.Net中,ios,objective-c,payment-gateway,authorize.net,Ios,Objective C,Payment Gateway,Authorize.net,我正在我的应用程序中实施授权.Net付款方式。它的工作很好,成功完成付款后,我无法将用户的详细信息发送到付款服务器。 我在事务处理后收到的成功邮件显示空值 ==== CUSTOMER BILLING INFORMATION === Customer ID : First Name : Last Name : Company : Address : City : State/Province : Zip/Postal Code : Country : Phone : Fax : E-Mail :
==== CUSTOMER BILLING INFORMATION ===
Customer ID :
First Name :
Last Name :
Company :
Address :
City :
State/Province :
Zip/Postal Code :
Country :
Phone :
Fax :
E-Mail :
我使用以下代码创建事务
- (void) createTransaction
{
AuthNet *an = [AuthNet authNetWithEnvironment:ENV_TEST];//[AuthNet getInstance];
[an setDelegate:self];
CreditCardType *creditCardType = [CreditCardType creditCardType];
creditCardType.cardNumber = @"4111111111111111";
creditCardType.cardCode = CvvNumberTxt.text;//@"100";
creditCardType.expirationDate = ExpiryDateTxt.text; //@"1218";
PaymentType *paymentType = [PaymentType paymentType];
paymentType.creditCard = creditCardType;
ExtendedAmountType *extendedAmountTypeTax = [ExtendedAmountType extendedAmountType];
extendedAmountTypeTax.amount = @"0";
extendedAmountTypeTax.name = @"Tax";
ExtendedAmountType *extendedAmountTypeShipping = [ExtendedAmountType extendedAmountType];
extendedAmountTypeShipping.amount = @"0";
extendedAmountTypeShipping.name = @"Shipping";
CustomerDataType *c = [CustomerDataType customerDataType];
c.type = @"Artist";
c.email = @"abc@gmail.com";
CustomerAddressType *customerAddressType = [CustomerAddressType customerAddressType];
customerAddressType.firstName = @"Abc";
customerAddressType.lastName = @"Xyz";
customerAddressType.country = @"India";
customerAddressType.state = @"Delhi";
customerAddressType.city = @"New Delhi";
customerAddressType.phoneNumber = @"9999999999";
LineItemType *lineItem = [LineItemType lineItem];
lineItem.itemName = @"Soda";
lineItem.itemDescription = @"Soda";
lineItem.itemQuantity = @"1";
lineItem.itemPrice = @"1.00";
lineItem.itemID = @"1";
TransactionRequestType *requestType = [TransactionRequestType transactionRequest];
requestType.lineItems = [NSMutableArray arrayWithObject:lineItem];
requestType.amount = amountTxt.text; //@"1.00";
requestType.payment = paymentType;
requestType.tax = extendedAmountTypeTax;
requestType.shipping = extendedAmountTypeShipping;
CreateTransactionRequest *request = [CreateTransactionRequest createTransactionRequest];
request.transactionRequest = requestType;
request.transactionType = AUTH_ONLY;
request.anetApiRequest.merchantAuthentication.mobileDeviceId = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
request.anetApiRequest.merchantAuthentication.sessionToken = sessionToken;
[an purchaseWithRequest:request];
}
我认为您需要在requestType下方或附近的TransactionRequest调用中添加一行。shipping=extendedAmountTypeShipping;行:
requestType.billing = CustomerAddressType;
我不是一个客观的C程序员,我也不熟悉他们的iOS API,但我忽略了PHP API中同样的东西。仔细检查该requestType.billing的文档。我只是猜到了 HI@Abhi我想在我的应用程序中使用authorize.net,但没有获得目标c中的代码,请帮助我,我在PHP API中遇到了同样的问题。我找不到任何答案。