Reply
Contributor
Posts: 14
Registered: ‎11-13-2017
Accepted Solution

Accept Hosted Payment Form billing field entries suddenly being ignored upon submit in sandbox

We recently noticed that billing info was suddenly being totally ignored on this hosted page because a regression test that had been working for many weeks suddenly began failing when the magic "Decline" zip code 46282 was apparently no longer being received, even though we are entering it into the UI.

 

I just verified that using the OLD Auth.Net iFrame, all entries are captured and works as expected.

 

Since there should be nothing we can do from outside the hosted form to cause it to not send the field values properly, can someone let us know what might be going on?

 

We are planning a major release in the next few weeks to move all of our Auth.Net customers to the NEW API, but that also hinges on seeing the hosted pages working properly in regression tests for some period before that time.

 

 


Accepted Solutions
Solution
Accepted by topic author tbas55
‎11-21-2017 06:36 AM
All Star
Posts: 699
Registered: ‎11-03-2016

Re: Accept Hosted Payment Form billing field entries suddenly being ignored upon submit in sandbox

 

Hi @tbas55,

 

Thanks for the XML. That's really helpful!

 

Looking back at the previous code you posted, I'm guessing that's the output of our .Net SDK. That SDK will look like it's putting in things that it doesn't actually send down the wire. So, just outputting an object to JSON is a little confusing for me to look at. But, even that was enough for me to figure out what was happening once I tried a similar request on my end.

 

You're not specifying the hostedPaymentBillingAddressOptions setting (which would look like this:)

    {
        "settingName": "hostedPaymentBillingAddressOptions",
        "settingValue": "{\"show\": true}"
    },

 

 

In the Accept Hosted documentation, we document that setting as not being a required setting, and with a default of "true". And, just like you'd expect, if you don't send the setting, you do still see the form fields displayed. But, just like you've seen, when you fill them in nothing is passed on once you click the "Pay" button.

 

So, there's clearly a part of our code that treats the null value of that setting different than the explicit "true" value. I'll escalate this and see about getting it fixed.

 

To work around this, you have two options. The easiest is probably to explicitly send that hostedPaymentBillingAddressOptions setting set to true. Or, you can prepopulate the address information in the billTo element. If you do that, then the address fields are saved whether or not you have the hostedPaymentBillingAddressOptions setting present.

 

You mentioned that prepopulating never worked for you. I can't imagine why that would be the case, but we can look into that. First, try prepopulating now, and see if the same change that broke the earlier behavior for you might have changed something on that front.

 

This is a really good catch, and I'm very thankful you reported it. Thanks for being patient and jumping through the hoops necessary for us to figure it out.

View solution in original post


All Replies
All Star
Posts: 699
Registered: ‎11-03-2016

Re: Accept Hosted Payment Form billing field entries suddenly being ignored upon submit in sandbox

Hi @tbas55,

 

In my testing, entering 46282 in the form correctly results in a decline, but maybe you're using some different settings than I am. Could you give me a way to duplicate what you're seeing?

 

Ideally, I'd love to get an example token request so I can see what values you're sending to request the form token. For example, I need to know if you're sending the address in the token request, or just entering it in the form, or sending it in the request but entering something differently in the form. Also, are you setting the address to be required in the hostedPaymentSettings?

 

Any more info you can provide would be extremely welcome.

Contributor
Posts: 14
Registered: ‎11-13-2017

Re: Accept Hosted Payment Form billing field entries suddenly being ignored upon submit in sandbox

Hello Aaron,

 

Since it appeared that your old iFrame did not pre-populate the address info, I commented those values out of our new API implementation, but that did not help with getting values to be noticed when entered on the iFrame.

 

I will double-check but I don't think we've changed any options when requesting the token since before the date that it stopped working AND I can't think of a reason why anything in that request should effect whether new values can be entered.

 

Here you can see a sample transaction on your site but without any values, although they were entered on the iFrame:

Transaction ID: 60034081265
tion
Transaction Status: 
Captured/Pending Settlement  
Order Information
  
Invoice #:
1
  
Description:
olb_wireless_functional_2017-11-13_92eec1a8-7731-4544-b6c8-539c66b9bb08
  
Customer Billing Information
  
Name:
   
Company:
   
Address:
   
City:
   
State/Province:
   
Zip Code:
   
Country:
   
Phone:
   
Fax:
   
Email:
   
 
   
Customer ID:
100106293
All Star
Posts: 699
Registered: ‎11-03-2016

Re: Accept Hosted Payment Form billing field entries suddenly being ignored upon submit in sandbox

Hi @tbas55,

 

Can you provide an example token request?

Contributor
Posts: 14
Registered: ‎11-13-2017

Re: Accept Hosted Payment Form billing field entries suddenly being ignored upon submit in sandbox

Aaron, I eliminated the billTo info completely from the token request so there is no confusion.

The old iFrame never pre-populated it either, but accepts iFrame values typed into the UI.

 

{"transactionRequest":{"transactionType":"authOnlyTransaction","amount":7.06,"amountSpecified":true,"currencyCode":null,"payment":null,"profile":null,"solution":null,"callId":null,"terminalNumber":null,"authCode":null,"refTransId":null,"splitTenderId":null,"order":{"invoiceNumber":"1","description":"olb_wireless_functional_2017-11-14_22f15639-c1e1-4531-8072-084e8e1f5d64"},"lineItems":null,"tax":null,"duty":null,"shipping":null,"taxExempt":false,"taxExemptSpecified":false,"poNumber":null,"customer":{"type":0,"typeSpecified":false,"id":"100106293","email":null,"driversLicense":null,"taxId":null},"billTo":null,"shipTo":null,"customerIP":null,"cardholderAuthentication":null,"retail":null,"employeeId":null,"transactionSettings":null,"userFields":[{"name":"IDI_FieldName","value":"IDI_fieldValue"}]},"hostedPaymentSettings":[{"settingName":"hostedPaymentReturnOptions","settingValue":"{\"showReceipt\": false,\"url\":\"https://tbau.idi.com:8081/paymentgatewayapp/olb_wireless_functional/PaymentProcessor/Index\",\"cance...": false}"},{"settingName":"hostedPaymentPaymentOptions","settingValue":"{\"cardCodeRequired\": true}"},{"settingName":"hostedPaymentIFrameCommunicatorUrl","settingValue":"{\"url\": \"https://tbau.idi.com:8081/paymentgatewayapp/olb_wireless_functional/PaymentProcessor/IFrameNotifier?...}



Contributor
Posts: 14
Registered: ‎11-13-2017

Re: Accept Hosted Payment Form billing field entries suddenly being ignored upon submit in sandbox

it said "Your post has been changed because invalid HTML was found in the message body. The invalid HTML has been removed. Please review the message and submit the message when you are satisfied."

 

so not sure you are fully getting what i sent or what the best way to do this is.

Contributor
Posts: 14
Registered: ‎11-13-2017

Re: Accept Hosted Payment Form billing field entries suddenly being ignored upon submit in sandbox

{
"transactionRequest": {
"transactionType": "authOnlyTransaction",
"amount": 7.06,
"amountSpecified": true,
"currencyCode": null,
"payment": null,
"profile": null,
"solution": null,
"callId": null,
"terminalNumber": null,
"authCode": null,
"refTransId": null,
"splitTenderId": null,
"order": {
"invoiceNumber": "1",
"description": "olb_wireless_functional_2017-11-14_31b48cca-d5d1-4916-b6e8-9a587d6f6c2b"
},
"lineItems": null,
"tax": null,
"duty": null,
"shipping": null,
"taxExempt": false,
"taxExemptSpecified": false,
"poNumber": null,
"customer": {
"type": 0,
"typeSpecified": false,
"id": "100106293",
"email": null,
"driversLicense": null,
"taxId": null
},
"billTo": null,
"shipTo": null,
"customerIP": null,
"cardholderAuthentication": null,
"retail": null,
"employeeId": null,
"transactionSettings": null,
"userFields": [
{
"name": "IDI_FieldName",
"value": "IDI_fieldValue"
}
]
},
"hostedPaymentSettings": [
{
"settingName": "hostedPaymentReturnOptions",
"settingValue": "{\"showReceipt\": false,\"url\":\"https://tbau.idi.com:8081/paymentgatewayapp/olb_wireless_functional/PaymentProcessor/Index\",\"cance..."}"
},
{
"settingName": "hostedPaymentOrderOptions",
"settingValue": "{\"show\": false}"
},
{
"settingName": "hostedPaymentPaymentOptions",
"settingValue": "{\"cardCodeRequired\": true}"
},
{
"settingName": "hostedPaymentIFrameCommunicatorUrl",
"settingValue": "{\"url\": \"https://tbau.idi.com:8081/paymentgatewayapp/olb_wireless_functional/PaymentProcessor/IFrameNotifier?..."}"
}
],
"merchantAuthentication": {
"name": "2R9rTB6mKKvk",
"Item": "****************",
"ItemElementName": 6,
"mobileDeviceId": null
},
"clientId": null,
"refId": null
}

Contributor
Posts: 14
Registered: ‎11-13-2017

Re: Accept Hosted Payment Form billing field entries suddenly being ignored upon submit in sandbox

OK, that one is more clear and here you can see no billing info even tho I entered it all on the UI:

 

Transaction Detail

 
 Transaction ID: 60034168099Create ARB Subscription from Transaction
Transaction Status: Captured/Pending Settlement  
   
    

 

Settlement Information
Settlement Amount:USD 7.06
Settlement Date and Time: 
Authorization Information
Authorization Amount:USD 7.06
Submit Date/Time:14-Nov-2017 14:35:14 PST
Authorization Code:KDBS91
Reference Transaction ID:Not Applicable
Transaction Type:Authorization Only
Market Type:eCommerce
Product:Card Not Present
Address Verification Status:Street Address: Match Zip: Matched first 5 digits (Y)
Card Code Status:Not Processed
CAVV Result Code:Not Applicable
Fraud Score Applied:Not Applicable
Recurring Billing Transaction:N
Partial Capture Status:Not Applicable
Customer IP:10.142.8.51
Payment Information
Card Type:Visa
Card Number:XXXX1111
Expiration Date:XXXX
Total Amount:USD 7.06
Order Information
Invoice #:1
Description:olb_wireless_functional_2017-11-14_31b48cca-d5d1-4916-b6e8-9a587d6f6c2b
Customer Billing Information
Name: 
Company: 
Address: 
City: 
State/Province: 
Zip Code: 
Country: 
Phone: 
Fax: 
Email: 
 
Customer ID:100106293
Customer Type: 
Customer TaxID/SSN: 
 
DL Number: 
DL State: 
DL DOB:
All Star
Posts: 699
Registered: ‎11-03-2016

Re: Accept Hosted Payment Form billing field entries suddenly being ignored upon submit in sandbox

Hi @tbas55,

 

In the window where you compose a message here, there's a button that looks like this: {i}

 

 

If you click that button, you can paste code directly in without the forum trying to mangle it.

 

That code you posted, how exactly are you using it? Where are you posting it? That doesn't quite match what would be used in our API for a token request using getHostedPaymentPageRequest. For example, sending that "amountSpecified" field should be throwing an error if you were sending that directly to our API.

Highlighted
Contributor
Posts: 14
Registered: ‎11-13-2017

Re: Accept Hosted Payment Form billing field entries suddenly being ignored upon submit in sandbox

using httpRequest.ContentType = "text/xml";

 

i am sending it to "https://apitest.authorize.net/xml/v1/request.api".

 

only JSON above to show you the values.  actually using XML serialization of your SDK objects.

from here: https://github.com/AuthorizeNet/sdk-dotnet

 

here's the class:  (seems to match your API doc)

[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd")]
[System.Xml.Serialization.XmlRootAttribute(Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd", IsNullable=false)]
public partial class getHostedPaymentPageRequest : ANetApiRequest {...