Adding a "Same as Billing" Checkbox
This code will allow you to add a box to your form that automatically duplicates the Billing information for use in the Shipping fields. This will save your customers some time while filling out the form.
- Log into your eBizCharge merchant gateway. Go to “Settings”, then “Source Keys”. Select the source key you are using and click “Edit”. Click “Edit Customization to Epay Form”.
- Click in the text box, then hit Ctrl-F on your keyboard to search the text. Search for “Shipping Information”. It should take you to a portion of code that looks like:
- <tr>
<td bgcolor="#C4C7D4" width="692" colspan="2"><b><font face="Verdana">Shipping Information:</font></b></td>
- Add the following code to the next line:
- <tr>
<td bgcolor="#F0F0F0" width="234" align="right"><font face="Verdana" size="2">Same as Billing:</font></td>
<td bgcolor="#F0F0F0" width="450">
<input type="checkbox" name="shipsameasbill" size="28" value="yes" onClick="copyBillingToShipping()"></td>
- Insert a new line and add the following between <script> and </script> tags:
- <!--
function copyBillingToShipping()
{
var form = document.epayform;
if(form.shipsameasbill.checked)
{
form.UMshipcompany.value=form.UMbillcompany.value;
form.UMshipfname.value=form.UMbillfname.value;
form.UMshiplname.value=form.UMbilllname.value;
form.UMshipcompany.value=form.UMbillcompany.value;
form.UMshipstreet.value=form.UMbillstreet.value;
form.UMshipstreet2.value=form.UMbillstreet2.value;
form.UMshipcity.value=form.UMbillcity.value;
form.UMshipstate.value=form.UMbillstate.value;
form.UMshipzip.value=form.UMbillzip.value;
form.UMshipcountry.value=form.UMbillcountry.value;
form.UMshipphone.value=form.UMbillphone.value;
}
}
//-->
- Save the changes to your form. This will create a checkbox on your payment form that looks like this:

Once you have saved changes to your payment form, you will be able to instantly fill out the Shipping fields with Billing information.
: