gpt4 book ai didi

ios - 客户的账单信息未显示在 Authorize.Net 中

转载 作者:行者123 更新时间:2023-11-29 11:50:04 24 4
gpt4 key购买 nike

我正在我的应用程序中实现 Authorize.Net 付款方式。它工作正常付款已成功完成,但我无法将用户的详细信息发送到付款的服务器。交易成功邮件显示空值

==== 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.shipping = extendedAmountTypeShipping; 下方或附近向 TransactionRequest 调用添加一行;行:

requestType.billing = CustomerAddressType;

我不是 Objective C 程序员,我不熟悉他们的 iOS API,但我忽略了 PHP API 的同样事情。仔细检查该 requestType.billing 的文档。我只是猜到了!

关于ios - 客户的账单信息未显示在 Authorize.Net 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41503511/

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