
To ensure that every Direct Mode transaction is backed by the customer's authorization, merchants must now include code provided by us which will display a checkbox and corresponding agreement language. This language will be included in the Misc. Info of the transaction details to confirm that the transaction was authorized.
The customer will not be able to click the button or link to proceed with the transaction unless the checkbox is checked. Upon checking the box, the merchant will receive a 14-digit ID number, which must be passed along with the customer's IP Address in the Direct Mode request to tie the customer's authorization with that specific transaction. The next section explains on a technical level how to install the checkbox.
The image will contain the checkbox, the appropriate agreement language, the amount, and the customer's IP. After the box is checked and the transaction is processed, the words shown in the image will be copied to the Misc. Info of the transaction, creating sufficient proof that the check was authorized.
A randomly generated 14-digit ID is used to tie the customer's authorization with the exact transaction that the customer assented to. The ID is stored in assent_key, and is included in both the initial request for the checkbox image and the Direct Mode request itself.
The merchant will need to make sure the 14-digit ID is passed via the assent_key parameter, and that the customer's IP is passed via the cust_ip parameter. PLEASE NOTE: The merchant MUST provide the assent_key and the cust_ip with every check transaction. If they are not provided the transaction will be rejected!
Merchant initiated repeat billing: For repeat billing of the same customer, the assent_key value from the original transaction must be included. The customer must have agreed to repeat/recurring billing at the time of the original transaction. Future repeat billing of transactions that were originally processed before the assent_key feature was introduced will be grandfathered, meaning they will continue to be approved without it. All new ACH transactions require a valid assent_key.
<script language="JavaScript">
function get_assent_amount(amt)
{
var s = document.images.assent_img.src;
var a1 = 8 + Math.max( s.indexOf("?amount="), s.indexOf("&amount="));
var p = s.substr(a1);
var a2 = s.indexOf("&",a1);
if (a2 >= 0) { p = p.substr(0,a2) }
return parseFloat(p);
}
function set_assent_amount(amt)
{
var s = document.images.assent_img.src;
var a1 = 8 + Math.max( s.indexOf("?amount="), s.indexOf("&amount="));
var a2 = s.indexOf("&",a1);
var p = s.substr(0,a1) + amt;
if (a2 > 0) { p += s.substr(a2); }
document.images.assent_img.src = p;
confirm_assent(4);
}
function get_assent_recurring_amount(amt)
{
var s = document.images.assent_img.src;
var a1 = 18 + Math.max( s.indexOf("?recurring_amount="), s.indexOf("&recurring_amount="));
var p = s.substr(a1);
var a2 = s.indexOf("&",a1);
if (a2 >= 0) { p = p.substr(0,a2) }
return parseFloat(p);
}
function set_assent_recurring_amount(amt)
{
var s = document.images.assent_img.src;
var a1 = 18 + Math.max( s.indexOf("?recurring_amount="), s.indexOf("&recurring_amount="));
var a2 = s.indexOf("&",a1);
var p = s.substr(0,a1) + amt;
if (a2 > 0) { p += s.substr(a2); }
document.images.assent_img.src = p;
confirm_assent(4);
}
function toggle_assent_recurring_amount(seq_no,desc,amt,ckd)
{
var s;
var a1;
var a2;
var p;
if (seq_no < 10) { seq_no = "0"+seq_no; }
s = document.images.assent_img.src;
a1 = Math.max( s.indexOf("?cs"+seq_no+"="), s.indexOf("&cs"+seq_no+"="));
p = s;
if (a1 < 0 && ckd)
{
p = s + "&cs" + seq_no + "=" + amt;
}
else if (a1 >= 0)
{
a1 += 6;
a2 = s.indexOf("&",a1);
p = s.substr(0,a1);
if (ckd) { p += amt };
if (a2 > 0) { p += s.substr(a2); }
}
s = p;
a1 = Math.max( s.indexOf("?cd"+seq_no+"="), s.indexOf("&cd"+seq_no+"="));
if (a1 < 0 && ckd)
{
p = s + "&cd" + seq_no + "=" + escape(desc);
}
else if (a1 >= 0)
{
a1 += 6;
a2 = s.indexOf("&",a1);
p = s.substr(0,a1);
if (ckd) { p += escape(desc); }
if (a2 > 0) { p += s.substr(a2); }
}
document.images.assent_img.src = p;
confirm_assent(4);
}
function confirm_assent(act) {
var s = document.images.assent_img.src;
var sl = s.lastIndexOf("/") + 1; var p = s.substr(0,sl);
var qm = s.indexOf("?"); var x = s.substr(sl,qm-sl)+"-"; var q = s.substr(qm);
var ck = x.indexOf("-checked") > 0; var fc = x.indexOf("-focused") > 0;
switch(act) {case 0:return ck; case 1:fc=true;break; case 2:fc=false;break; case 3:ck=!ck; break; case 4: ck=false;}
x = x.substr(0,x.indexOf("-")); if(ck) { x+="-checked"; } if(fc) { x+="-focused"; }
var ak = q.indexOf("assent_key");
var rn = "";
var f = document.getElementById("assent_key");
if (!f) { alert('Webmaster: You must have an assent_key to update.')}
if (ak < 0 && ck)
{
rn="8999999999999"+Math.floor(Math.random()*99999999999999);
rn=rn.substr(rn.length-14);
q += "&assent_key=" + rn;
f.value = rn;
// At this point, the script automatically sets the value of
// <input name=assent_key id=assent_key> with the 14-digit ID stored in 'rn'.
} else if (ak >= 0 && !ck)
{
q = q.substring(0, ak-1);
rn = "";
f.value = rn;
}
document.images.assent_img.src=p+x+q;
}
</script>
<img src="https://secure.nbcheck.com/assent/v1_png?account=110123456789&amount=4.95&recurring_amount=29.95" name="assent_img" onMouseOver="confirm_assent(1)" onMouseOut="confirm_assent(2)" onClick="confirm_assent(3)">
onClick="if(!confirm_assent(0)) { alert('You must check the agreement box before proceeding with this transaction.'); return false; }"
<input type=hidden id=assent_key name=assent_key>
The value of this input tag is automatically updated by the JavaScript provided in section 1.1.1.
|
Merchant Payment Page Example
Amount: $29.95
Below is the assent_key that would be submitted in the Direct Mode request. It's shown here for demonstration purposes: <input type=hidden name=assent_key id=assent_key> |
<script language="JavaScript">
function get_assent_amount(amt)
{
var s = document.images.assent_img.src;
var a1 = 8 + Math.max( s.indexOf("?amount="), s.indexOf("&amount="));
var p = s.substr(a1);
var a2 = s.indexOf("&",a1);
if (a2 >= 0) { p = p.substr(0,a2) }
return parseFloat(p);
}
function set_assent_amount(amt)
{
var s = document.images.assent_img.src;
var a1 = 8 + Math.max( s.indexOf("?amount="), s.indexOf("&amount="));
var a2 = s.indexOf("&",a1);
var p = s.substr(0,a1) + amt;
if (a2 > 0) { p += s.substr(a2); }
document.images.assent_img.src = p;
confirm_assent(4);
}
function get_assent_recurring_amount(amt)
{
var s = document.images.assent_img.src;
var a1 = 18 + Math.max( s.indexOf("?recurring_amount="), s.indexOf("&recurring_amount="));
var p = s.substr(a1);
var a2 = s.indexOf("&",a1);
if (a2 >= 0) { p = p.substr(0,a2) }
return parseFloat(p);
}
function set_assent_recurring_amount(amt)
{
var s = document.images.assent_img.src;
var a1 = 18 + Math.max( s.indexOf("?recurring_amount="), s.indexOf("&recurring_amount="));
var a2 = s.indexOf("&",a1);
var p = s.substr(0,a1) + amt;
if (a2 > 0) { p += s.substr(a2); }
document.images.assent_img.src = p;
confirm_assent(4);
}
function toggle_assent_recurring_amount(seq_no,desc,amt,ckd)
{
var s;
var a1;
var a2;
var p;
if (seq_no < 10) { seq_no = "0"+seq_no; }
s = document.images.assent_img.src;
a1 = Math.max( s.indexOf("?cs"+seq_no+"="), s.indexOf("&cs"+seq_no+"="));
p = s;
if (a1 < 0 && ckd)
{
p = s + "&cs" + seq_no + "=" + amt;
}
else if (a1 >= 0)
{
a1 += 6;
a2 = s.indexOf("&",a1);
p = s.substr(0,a1);
if (ckd) { p += amt };
if (a2 > 0) { p += s.substr(a2); }
}
s = p;
a1 = Math.max( s.indexOf("?cd"+seq_no+"="), s.indexOf("&cd"+seq_no+"="));
if (a1 < 0 && ckd)
{
p = s + "&cd" + seq_no + "=" + escape(desc);
}
else if (a1 >= 0)
{
a1 += 6;
a2 = s.indexOf("&",a1);
p = s.substr(0,a1);
if (ckd) { p += escape(desc); }
if (a2 > 0) { p += s.substr(a2); }
}
document.images.assent_img.src = p;
confirm_assent(4);
}
function confirm_assent(act) {
var s = document.images.assent_img.src;
var sl = s.lastIndexOf("/") + 1; var p = s.substr(0,sl);
var qm = s.indexOf("?"); var x = s.substr(sl,qm-sl)+"-"; var q = s.substr(qm);
var ck = x.indexOf("-checked") > 0; var fc = x.indexOf("-focused") > 0;
switch(act) {case 0:return ck; case 1:fc=true;break; case 2:fc=false;break; case 3:ck=!ck; break; case 4: ck=false;}
x = x.substr(0,x.indexOf("-")); if(ck) { x+="-checked"; } if(fc) { x+="-focused"; }
var ak = q.indexOf("assent_key");
var rn = "";
var f = document.getElementById("assent_key");
if (!f) { alert('Webmaster: You must have an assent_key to update.')}
if (ak < 0 && ck)
{
rn="8999999999999"+Math.floor(Math.random()*99999999999999);
rn=rn.substr(rn.length-14);
q += "&assent_key=" + rn;
f.value = rn;
<b>Merchant Payment Page Example</b>
<p>
Amount: $29.95<br><br>
Bank Routing Number:<br><input name=routing_number><br>
Bank Account Number:<br><input name=account_number><br>
<p>
<img style="border-style:solid;border-color:black;border-width:thin" src="https://secure.nbcheck.com/assent/v1_png?width=400&font_face=arial&font_size=9&account=110006559149&amount=4.95&recurring_amount=29.95&bgcolor=ffffff&fgcolor=000000" name="assent_img" onMouseOver="confirm_assent(1)" onMouseOut="confirm_assent(2)" onClick="confirm_assent(3)">
<p>
<input type=button value="Proceed" onClick="if(!confirm_assent(0)) { alert('You must check the agreement box before proceeding with this transaction.'); return false; }">
<input type=button value="Upsell $5" onClick="set_assent_amount(get_assent_amount()+5)"><br><br>
<input type=checkbox onClick="toggle_assent_recurring_amount(1,'widgets',9.95,checked)">Cross sell #1: Widgets, $9.95<br>
<input type=checkbox onClick="toggle_assent_recurring_amount(2,'a bunch of gadgets', 9.95,checked)">Cross sell #2: Gadgets, $9.95<br>
<input type=checkbox onClick="toggle_assent_recurring_amount(3,'a handfull of doodads',149.00,checked)">Cross sell #3: Doodads, $149.00
<p>
Below is the assent_key that would be submitted in the Direct Mode request. It's shown here for demonstration purposes:<br><br>
assent_key: <input type=text readonly style="background:#e3e3e3" id=assent_key>
<br><br>Normally, the input field should be written as: <br> <pre><input type=hidden name=assent_key id=assent_key></pre>
|