cancel
Showing results for 
Search instead for 
Did you mean: 

How to make company/business name an editable field in Accept Hosted Payment Form

I would like to add an editable company/business name field to my Accept Hosted Payment Form. How can I achieve this?

Here is the JSON object in my getHostedPaymentPageRequest -

function authUser(dono_amount, customer_type, user_email_address, user_first_name, user_last_name, user_business, user_address, user_city, user_state, user_zip, user_phone_number, show_credit_card, show_bank_account) {
$.when(
$.ajax({
url: "https://apitest.authorize.net/xml/v1/request.api",
type: "POST",
contentType: "application/json",
data: JSON.stringify({
"getHostedPaymentPageRequest": {
"merchantAuthentication": {
"name": "[name]",
"transactionKey": "[key]"
},
"transactionRequest": {
"transactionType": "authCaptureTransaction",
"amount": dono_amount,
"profile": {
"customerProfileId": "[id]"
},
"customer": {
"type": customer_type,
"email": user_email_address,
},
"billTo": {
"firstName": user_first_name,
"lastName": user_last_name,
"company": user_business,
"address": user_address,
"city": user_city,
"state": user_state,
"zip": user_zip,
"country": "US",
"phoneNumber": user_phone_number
}
},
"hostedPaymentSettings": {
"setting": [{
"settingName": "hostedPaymentReturnOptions",
"settingValue": "{\"showReceipt\": true, \"url\": \"https://mysite.com/receipt\", \"urlText\": \"Donate\", \"cancelUrl\": \"mysite.com\", \"cancelUrlText\": \"Cancel\"}"
}, {
"settingName": "hostedPaymentButtonOptions",
"settingValue": "{\"text\": \"Donate\"}"
}, {
"settingName": "hostedPaymentStyleOptions",
"settingValue": "{\"bgColor\": \"#41413F\"}"
}, {
"settingName": "hostedPaymentPaymentOptions",
"settingValue": "{\"cardCodeRequired\": true, \"showCreditCard\": " + show_credit_card + ", \"showBankAccount\": " + show_bank_account + "}"
}, {
"settingName": "hostedPaymentSecurityOptions",
"settingValue": "{\"captcha\": true}"
}, {
"settingName": "hostedPaymentShippingAddressOptions",
"settingValue": "{\"show\": false, \"required\": false}"
}, {
"settingName": "hostedPaymentBillingAddressOptions",
"settingValue": "{\"show\": true, \"required\": false}"
}, {
"settingName": "hostedPaymentCustomerOptions",
"settingValue": "{\"showEmail\": true, \"requiredEmail\": true, \"addPaymentProfile\": false}"
}, {
"settingName": "hostedPaymentOrderOptions",
"settingValue": "{\"show\": true, \"merchantName\": \"MerchantName\"}"
}, {
"settingName": "hostedPaymentIFrameCommunicatorUrl",
"settingValue": "{\"url\": \"}"
}]
}
}
}),
dataType: "json",
success: function (response) {
console.log(response);
console.log(response.token);
$("#send_token input").attr("value", response.token)
}
})
).done(function () {
$("#iframe_holder").addClass("open-iframe");
$("#add_payment").show();
$("#send_token").attr({ "action": "https://test.authorize.net/payment/payment", "target": "add_payment" }).submit();
});
}

dvieira
Member
4 REPLIES 4
To make the company/business name editable in Accept Hosted Payment Form, customize the form's HTML to include an input field for the company/business name. Ensure the field is correctly mapped and processed during payment submission. 
 

 

 

 

 

 

 

 

 

johnsen875
Member
To make the company/business name editable in the Accept Hosted Payment Form, enable the company field by setting hosted Payment Customer Options .show Company to true in your API request configuration.
 
sameer2492
Member

To make the company/business name an editable field in the Accept Hosted Payment Form (Authorize. Net), customize the form using the Hosted Payment Settings in the Merchant Interface. Enable and mark the “Company” field as editable in the Billing Information section. Use the API to include hosted Payment Billing Address Options with "show Company": true and "required": false.

sameer2492
Member

To make the company/business name editable in an Accept Hosted Payment Form, update your Authorize.Net payment form settings. In the form customization or API request parameters, set the company field as visible and editable instead of read-only. Save changes, then test the form to ensure users can enter or modify their business name.

sameer2492
Member