Home > Developers: Integration Overview > Transparent Database Engine > PHP: Transparent Database Engine

Use of this integration template requires intermediate- to advanced-level programming capability. eProcessing Network offers support for this template via email only at devutils@eprocessingnetwork.com.

eProcessing Network offers the following sample PHP source code to assist developers in integrating the eProcessing Network Transparent Database Engine Template for payment processing. 

Please note the following:

  • The sample source code shown below uses hard-coded values. You, as a programmer, must replace these hard-coded values with the values you prompt customers for.
  • The hard-coded test account number can be used if you do not yet have an eProcessing Network account. A test transaction can be run at anytime by simply using the merchant's eProcessing Network account number as the credit card number, regardless of whether you are using a test account number or a live account number.
  • ExpMonth and ExpYear must both be in two-digit format or you will very definitely achieve unexpected results because of the different ways issuing banks process transactions.

The required format of the variable names to pass to the eProcessing Network Transparent Database Engine Template is as follows:

ePNAccount
CardNo
ExpMonth
ExpYear
Total
Address
Zip
CVV2Type
CVV2

CVV2Type, related values and sample HTML are documented here.

This PHP source requires PHP modules/libraries that are widely available. It is assumed here that the programmer understands the importance of these modules/libraries, and knows how to install them.

<?php

// initiate cURL w/ protocol & URL of remote host
$ch=curl_init("https://www.eprocessingnetwork.com/cgi-bin/tdbe/transact.pl");

// normal POST request
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$post_data_goes_here="ePNAccount=05971&CardNo=05971..."
);

// set response to return as variable
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);

// trap response into $response var
$response=curl_exec($ch);

// close cURL transfer
curl_close($ch);

$auth=substr($response,1,1);

if ($auth=="Y")
{
  do_something("for authorized transactions");
}
else
{
  do_something_else("for declined transactions");
}

?>

By default, the eProcessing Network Transparent Database Engine Template outputs its' response in HTML format, i.e. wrapped in <html> and <body> tags, which can often aid in testing. Sending the additional variable HTML set to No causes the template to output the response without the HTML tags.

After the transaction has been processed, the banks' response to the transaction, as well as the Address Verification System and CVV2 responses, are output as follows:

With HTML:

<html><body>"YAUTH/TKT 019829","Address and Zip Code Do Not Match","CVV2 Not a Match"</body></html>

Without HTML:

"YAUTH/TKT 019829","Address and Zip Code Do Not Match","CVV2 Not a Match"

The response is essentially three quoted, comma-delimited strings. The first string always starts with a Y (Yes, approved), an N (No, declined) or a U (No, unable), and is followed by up to 16 characters describing the response. The second string is the Address Verification Systems' response to the street address and Zip code supplied. The third string is the processors response to the CVV2 information supplied.

 

For questions, suggestions or special requests, email us at devutils@eprocessingnetwork.com.

Facebook   LinkedIn   YouTube
Copyright 2014 eProcessing Network, LLC. All Rights Reserved.