I have the following code implemented and everything is working fine except when the payment form comes up the merchant name and line items are not shown. There is no error, they just are not there. The transaction amount is shown, the bill to information is populated correctly just the merchant name and line items. What am I missing?
Private Function GetHostedPaymentPageResponse(ApiLoginID As [String], ApiTransactionKey As [String], amount As Decimal) As ANetApiResponse ApiOperationBase(Of ANetApiRequest, ANetApiResponse).RunEnvironment = AuthorizeNet.Environment.SANDBOX Dim merchantAuthenticationType As New merchantAuthenticationType() merchantAuthenticationType.name = ApiLoginID merchantAuthenticationType.ItemElementName = ItemChoiceType.transactionKey merchantAuthenticationType.Item = ApiTransactionKey ApiOperationBase(Of ANetApiRequest, ANetApiResponse).MerchantAuthentication = merchantAuthenticationType System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12 Dim settings As settingType() = New settingType(1) {} settings(0) = New settingType() settings(0).settingName = settingNameEnum.hostedPaymentButtonOptions.ToString() settings(0).settingValue = "{""text"": ""Pay Now""}" settings(1) = New settingType() settings(1).settingName = settingNameEnum.hostedPaymentOrderOptions.ToString() settings(1).settingValue = "{""show"": true, ""merchantName"":""My Company""}" Dim MylineItems(0) As AuthorizeNet.Api.Contracts.V1.lineItemType Dim thisLineItem As New AuthorizeNet.Api.Contracts.V1.lineItemType thisLineItem.itemId = "a100" thisLineItem.quantity = 1 thisLineItem.name = "test" thisLineItem.description = "Software Training" thisLineItem.unitPrice = 3500.0 MylineItems(0) = thisLineItem Dim thisCustomerType As New AuthorizeNet.Api.Contracts.V1.customerAddressType thisCustomerType.address = "123 main" thisCustomerType.city = "Santa Barbara" thisCustomerType.state = "CA" thisCustomerType.country = "USA" thisCustomerType.zip = "93111" ' authorize capture only Dim transactionRequest = New transactionRequestType() With { _ .transactionType = transactionTypeEnum.authCaptureTransaction.ToString(), _ .amount = amount, _ .lineItems = MylineItems, _ .billTo = thisCustomerType _ } Dim request = New getHostedPaymentPageRequest() request.transactionRequest = transactionRequest request.hostedPaymentSettings = settings ' instantiate the contoller that will call the service Dim controller = New getHostedPaymentPageController(request) controller.Execute() ' get the response from the service (errors contained if any) Dim response1 = controller.GetApiResponse() Response.Clear() Dim posturl As String = "https://test.authorize.net/payment/payment" Dim sb As New StringBuilder sb.Append("") sb.AppendFormat("") sb.AppendFormat(" ", posturl) sb.AppendFormat("", response1.token) sb.Append(" ") sb.Append("") sb.Append("") sb.Append("") Response.Write(sb.ToString()) Response.End() Return response1 End Function
Thanks.
โ08-15-2017 10:28 AM
Hi @jmorgret,
Unfortunately, there's nothing on the form that would show lineItems that were submitted, but I can definitely see the usefulness in such a scenario.
I'd encourage you to post this onto our Ideas Forum where others can take a look, contribute feedback, and vote for new features.
The Merchant Name is for the receipt page that's optionally shown after the payment information is submitted.
โ08-25-2017 05:19 PM
Ok, thank you. I guess what I was looking for was the Order description. I added that it is what I needed.
Thank you.
โ08-29-2017 01:24 PM
Has there been any development on this. We are also trying to display the line item but could not find any example.
โ05-11-2018 01:43 PM
I know not ideal, but I wonder if you could combine the line item description into the main order description? You have up to 255 chars for the order description.
โ01-29-2019 11:54 AM