echeck payment gateway integration in php
how to integrate ACH and electronic checks in your website
echeck merchant account
how to integrate ACH and electronic checks in your website
echeck merchant account
First Name | |
Last Name | |
Address | |
City | |
State | |
Zip Code | |
Phone | |
Bank Account Number | |
Routing Number | |
Plan | |
Amount | |
//create array of data to be posted
$post_data['security_key'] = 'xxxxxxxxxx'; // Insert your security key here$post_data['purchaser_firstname'] = $_REQUEST['fname'];
$post_data['purchaser_lastname'] = $_REQUEST['lname'];
$post_data['purchaser_address'] = $_REQUEST['address'];
$post_data['purchaser_city'] = $_REQUEST['city'];
$post_data['purchaser_state'] = $_REQUEST['state'];
$post_data['purchaser_zipcode'] = $_REQUEST['zip'];
$post_data['purchaser_phone'] = $_REQUEST['phone'];
$post_data['purchaser_email'] = $_REQUEST['email'];
$post_data['transaction_amount'] = $_REQUEST['amount'];
$post_data['purchaser_ip'] = $_SERVER["REMOTE_ADDR"];
$post_data['purchaser_account'] = $_REQUEST['paccount']; // The test account number is 000000
$post_data['purchaser_routing'] = $_REQUEST['prouting']; // The test routing number is 011000015
foreach ( $post_data as $key => $value) { $post_items[] = $key . '=' . $value; }
//create the final string to be posted using implode()
//create cURL connection
$curl_connection = curl_init('https://theecheck.com/backoffice/api/api.php');//set options
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true); // Must be set to recieve transaction
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
//set data to be posted
curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);//perform our request
$result = curl_exec($curl_connection); // Catches the result from the request into a variableecho "Transaction Result: " . $result . "
";
//show information regarding the request
print_r(curl_getinfo($curl_connection)); information regarding the CURL requestecho curl_errno($curl_connection) . '-' . curl_error($curl_connection);
//close the connection
curl_close($curl_connection);}
Friend Can you help me with the code which can be implemented by copy and paste. for the echeck.com
ReplyDeleteI copied the code here but it only gives a blank page
my code which i have coppied below is $value) { $post_items[] = $key . '=' . $value; }
ReplyDelete//create the final string to be posted using implode()
$post_string = implode ('&', $post_items);
//create cURL connection
$curl_connection = curl_init('https://theecheck.com/backoffice/api/api.php');
//set options
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true); // Must be set to recieve transaction
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
//set data to be posted
curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);
//perform our request
$result = curl_exec($curl_connection); // Catches the result from the request into a variable
echo "Transaction Result: " . $result . "
";
//show information regarding the request
print_r(curl_getinfo($curl_connection)); information regarding the CURL request
echo curl_errno($curl_connection) . '-' . curl_error($curl_connection);
//close the connection
curl_close($curl_connection);
}
?>
http://avianceschool.com/
ReplyDelete