Reply
Member
Posts: 5
Registered: ‎03-30-2017

Billing Information is not populating via Hosted Form in Authorize.net

Hi All,
We having an issue with Payment Hosted form of Authorize.net integrated in Salesforce, We are passing bill to details in json token request but some how the details are not appearing in customer billing information on transaction details in Authorize.net.

Here is the Json data we are passing :

{
"getHostedPaymentPageRequest": {
    "merchantAuthentication": {
        "name": "87n6b5DLXsV",
        "transactionKey": "XXXXXXX"
    },
    "transactionRequest": {
        "transactionType": "authOnlyTransaction",
        "amount": "150.00",
        "order": {
            "invoiceNumber": "test",
            "description": "Payment for Order #test"
        },
        "customer": {
            "email": "test@test.com"
        },
        "billTo": {
            "firstName": "Test",
            "lastName": "test",
            "company": "test",
            "address": "tes",
            "city": "ttes",
            "state": "tes",
            "zip": "tes",
            "country": "AFG",
            "phoneNumber": "test"
        }
    },
    "hostedPaymentSettings": {
        "setting": [{
            "settingName": "hostedPaymentBillingAddressOptions",
            "settingValue": "{\"show\": false, \"required\":true}"
        }, {
            "settingName": "hostedPaymentButtonOptions",
            "settingValue": "{\"text\": \"Pay\"}"
        }, {
            "settingName": "hostedPaymentCustomerOptions",
            "settingValue": "{\"showEmail\":false,\"requiredEmail\":true}"
        }, {
            "settingName": "hostedPaymentPaymentOptions",
            "settingValue": "{\"cardCodeRequired\":true}"
        }, {
            "settingName": "hostedPaymentReturnOptions",
            "settingValue": "{\"showReceipt\":false,\"url\":\"https://test.cs21.force.com/test/test\",\"urlText\":\"Continue\",\"cancelUrl\":\"https://test.cs21.force.com/test/test\",\"cancelUrlText\":\"Cancel\"}"
        }, {
            "settingName": "hostedPaymentSecurityOptions",
            "settingValue": "{\"captcha\": false}"
        }, {
            "settingName": "hostedPaymentShippingAddressOptions",
            "settingValue": "{\"show\":false,\"required\":false}"
        }, {
            "settingName": "hostedPaymentOrderOptions",
            "settingValue": "{\"show\":false,\"merchantName\":\"Jyotish Site Guest User\"}"
        }, {
            "settingName": "hostedPaymentIFrameCommunicatorUrl",
            "settingValue": "{\"url\":\"https://test.cs21.force.com/test/test\"}"
        }, {
            "settingName": "hostedPaymentStyleOptions",
            "settingValue": "{\"bgColor\": \"EE00EE\"}"
        }]
    }
}
}

Here is the Transaction details in Authnet account :

 

 

Any help or suggesstions would be appreciated. 
Posts: 138
Topics: 0
Kudos: 27
Blog Posts: 0
Ideas: 0
Solutions: 9
Registered: ‎04-28-2017

Re: Billing Information is not populating via Hosted Form in Authorize.net

[ Edited ]

That is the way it works when hostedPaymentBillingAddressOptions is set to false with:

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

If you set hostedPaymentBillingAddressOptions to true, the resulting form will be prepoulated the billing information that was sent when requesting the form.

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



Powered by NexWebSites.com -
Certified Authorize.net developers
Contributor
Posts: 10
Registered: ‎04-25-2017

Re: Billing Information is not populating via Hosted Form in Authorize.net

Thanks. We have a few fields of information that we need to ask for in addition to the Billing Address information. We are hoping that we can find a way to use our own form to ask for that information and the Billing Address, and then use the Accept Hosted form to just collect the credit card info, but still have the billing information show up in the transaction record in Authorize.net. 

Administrator
Posts: 419
Registered: ‎11-03-2016

Re: Billing Information is not populating via Hosted Form in Authorize.net

In that case where you want to use your own form, you might want to be using Accept.js. Build your form to collect whatever information you want from the customer plus the credit card information. Set up the form so that when someone clicks the submit button, the credit card number will get converted to the Accept token, then everything gets submitted to your server.

 

Server-side, you do whatever you want with the information submitted, and then send a transaction to us with all the information you want to send to us, just with the Accept token/nonce instead of the credit card info.

 

Accept Hosted can still be used in this case, where you gather information in one step, then use it to request and display the Accept Hosted form in another step. But, you could integrate everything together in one form and save the customer some time by using Accept.js.

-Aaron

Aaron Wright
Developer Advocate - Authorize.Net

Follow Authorize.Net developer news on Twitter!
Contributor
Posts: 10
Registered: ‎04-25-2017

Re: Billing Information is not populating via Hosted Form in Authorize.net

Thanks Aaron. I hadn't seen that there is a separate API syntax to use the Nonce instead of the token. It's a slightly different set of steps, but now it's clear.