Can you please provide me the sample code for doing payment using echeck??its very urgent..
Thanks
12-30-2009 03:40 AM
You can use the sample code provided for the Advanced Integration Method (AIM) to process AIM transactions which will also allow you to process echeck transactions. You just need to change a few of the parameters.
01-02-2010 05:24 PM
Maybe this will be easier for you to use. Download the Authnet PHP Class from this tutorial and save it as AuthnetAIM.class.php. Here's sample code you would need to use it to process eChecks:
$total = $_POST['total'];
$routing = $_POST['routing'];
$account = $_POST['acctnumber'];
$bankname = $_POST['bankname'];
$acctname = $_POST['acctname'];
switch ($_POST['accttype'])
{
case 'Personal Checking':
$accttype = 'checking';
$echecktype = 'PPD';
break;
case 'Business Checking':
$accttype = 'businessChecking';
$echecktype = 'CCD';
break;
case 'Savings':
$accttype = 'savings';
$echecktype = 'PPD';
}
require_once('AuthnetAIM.class.php');
$payment = new AuthnetAIM();
$payment->setEcheck($total, $routing, $account, $accttype, $bankname, $acctname, $echecktype);
$payment->process();
You'll notice you'll need to create a form field that lets users choose what checking account type they are using called 'accttype' and then use PHP to use what they choose to set two of the parameters sent to Authnet to process the transaction. Also be sure to do proper data validation.
01-03-2010 12:54 PM
I have tried this repeatedly and no matter what get the same error every time even when using a real 9-digit routing number:
exception 'AuthnetAIMException' with message 'AuthnetAIM::setEcheck() requires a nine digit ABA/routing number.'
04-14-2011 04:39 PM
I found the issue (I always do right after posting on forums...)
In the PHP class, it was missing a reference to a variable.
Wrong (and in current PHP class that I downloaded a few weeks ago):
final public function setEcheck($aba, $account, $accttype, $bankname, $bankacctname, $echecktype, $transtype = 'AUTH_CAPTURE')
Right
final public function setEcheck($amount, $aba, $account, $accttype, $bankname, $bankacctname, $echecktype, $transtype = 'AUTH_CAPTURE')
04-14-2011 04:45 PM
Can you please suggest me any reference where I caould implement this in ASP.Net ?
12-02-2013 03:57 AM
12-02-2013 03:13 PM
John Conde:
I tried to implement the code you provided in the blog post that I am responding to but it could not operate properly because the amount is NOT included in the argument list of the setEcheck function ( of AuthnetAIM.class.php ) . So the sample code does not match the downloadable library file.
I am trying to get some code to implement echeck on my web site, can you suggest or provide anything that I could use ?
Thank you, Steve Padgett.
01-01-2015 10:45 AM