Example #1
0
 function Execute_Sale(&$transInfo, &$bankInfo, &$companyInfo)
 {
     $client = new nusoapclient('https://soap.Servpay.com/tx2.php?wsdl', true);
     $sid = 20115;
     $rcode = $bankInfo['bk_additional_id'];
     $uip = strval($transInfo['ipaddress']);
     if ($bankInfo['cb_config']['custom']['tid_sites'][$transInfo['td_site_ID']]) {
         $sid = $bankInfo['cb_config']['custom']['tid_sites'][$transInfo['td_site_ID']];
     }
     $expDate = explode("/", $transInfo['validupto']);
     $expYear = $expDate[0];
     $expMonth = $expDate[1];
     $cust_cntry = urlencode(func_get_country($transInfo['country'], 'co_full'));
     $transInfo['cardtype'] = 'VISA';
     if (substr($transInfo['CCnumber'], 0, 1) == '5') {
         $transInfo['cardtype'] = 'MASTERCARD';
     }
     if (!$transInfo['state']) {
         $transInfo['state'] = "NA";
     }
     $udetails = array('username' => '', 'password' => '', 'card_name' => strval($transInfo['name'] . " " . $transInfo['surname']), 'card_no' => strval($transInfo['CCnumber']), 'card_type' => $transInfo['cardtype'], 'card_ccv' => strval($transInfo['cvv']), 'card_exp_month' => strval($expMonth), 'card_exp_year' => strval($expYear), 'bank_name' => '', 'bank_phone' => $transInfo['td_bank_number'], 'firstname' => strval($transInfo['name']), 'lastname' => strval($transInfo['surname']), 'email' => strval($transInfo['email']), 'phone' => strval($transInfo['phonenumber']), 'mobile' => '', 'address' => strval($transInfo['address']), 'suburb_city' => strval($transInfo['city']), 'state' => strval($transInfo['state']), 'postcode' => strval($transInfo['zipcode']), 'country' => strval($cust_cntry), 'ship_firstname' => strval($transInfo['name']), 'ship_lastname' => strval($transInfo['surname']), 'ship_address' => strval($transInfo['address']), 'ship_suburb_city' => strval($transInfo['city']), 'ship_state' => strval($transInfo['state']), 'ship_postcode' => strval($transInfo['zipcode']), 'ship_country' => strval($cust_cntry));
     $txparams = array('ref1' => 'NULL', 'cmd' => '', 'vbv' => NULL);
     $cart = array('items' => array(array('name' => 'null', 'quantity' => 1, 'amount_unit' => round($transInfo['amount'], 2), 'item_no' => '', 'item_desc' => '')), 'summary' => array('quantity' => 1, 'amount_purchase' => round($transInfo['amount'], 2), 'amount_shipping' => '0', 'currency_code' => 'USD'));
     $param = array('sid' => $sid, 'rcode' => $rcode, 'uip' => $uip, 'udetails' => $udetails, 'cart' => $cart, 'txparams' => $txparams);
     $process_result = $client->call('processSinglePayTx', $param);
     //print_r($param);print_r($process_result);
     $response = NULL;
     $response['td_bank_transaction_id'] = $process_result['txid'];
     $response['td_process_result'] = serialize($process_result);
     $response['td_process_query'] = serialize($param);
     $response['td_bank_recieved'] = 'yes';
     //if(in_array($process_result['Status'],array('5','4','2')))
     //	$response['td_bank_recieved'] = 'no';
     if ($process_result['status'] == 'OK') {
         $response['status'] = "A";
         $response['td_bank_recieved'] = 'yes';
         $response['td_process_msg'] = $process_result['status'] . ": Approved";
     } else {
         $response['status'] = "D";
         $response['errormsg'] = $process_result['error']['msg'] . " " . $process_result['error']['info'];
         if (!$response['errormsg']) {
             $response['errormsg'] = "Declined (SoEx)";
         }
     }
     return $response;
 }
            continue;
        }
        while ($invoiceInfo = mysql_fetch_assoc($inv_details)) {
            if ($invoiceInfo['bank_country'] == 'US' || $invoiceInfo['bank_country'] == 'United States') {
                $mib_wire_type = 'us';
            }
            $thisdate_id = date("Ymd", strtotime($invoiceInfo['mi_paydate']));
            $payID = $invoiceInfo['userId'] . "_" . $thisdate_id;
            $wireFee = $invoiceInfo['bk_fee_us_wire'];
            if ($invoiceInfo['mib_wire_type'] == 'non-us') {
                $wireFee = $invoiceInfo['bk_fee_nonus_wire'];
            }
            $balance = $invoiceInfo['mib_balance'];
            //+$wireFee;
            $full_cntry = func_get_country($invoiceInfo['bank_country'], 'co_full');
            $char3_cntry = func_get_country($invoiceInfo['bank_country'], 'co_3char');
            //$filename = "ETEL.".$thisdate_id.".PO.Release.cvs";
            $paymentMethod = 1;
            if ($invoiceInfo['mib_wire_type'] == 'us') {
                $paymentMethod = 5;
            }
            if ($merchant[$invoiceInfo['userId']]) {
                $balance += $merchant[$invoiceInfo['userId']]['balance'];
            }
            //$payout.=genInvoice(&$invoiceInfo);
            $merchant[$invoiceInfo['userId']] = array('payout' => genInvoice(&$invoiceInfo), 'balance' => $balance);
        }
    }
}
foreach ($merchant as $key => $data) {
    if ($data['balance'] > 20) {
}
$company_bank_id = $subAcc['company_bank_id'];
$_SESSION['bank_id'] = $company_bank_id;
$InitialAmount = "\$" . formatMoney($_SESSION['amount']);
if ($cc_customer_fee) {
    $InitialAmount .= " (+ \$" . formatMoney($cc_customer_fee) . ")";
}
$TrialDays = $subAcc['rd_trial_days'] . " Day(s)";
if (!$subAcc['rd_trial_days']) {
    $TrialDays = "One Time Payment";
}
$RecurDays = $subAcc['recur_day'] . " Day(s)";
if ($companyInfo['bank_Creditcard'] == 19) {
    $custom_text = "Forcetronix Inc.<BR>\n\tU12 Gamma Commercial Complex, #47<BR>\n\tRizal Highway cor. Manila Avenue,<BR>\n\tSubic Bay Freeport, Olongapo City<BR>\n\tPhilippines<BR>\n\tIs an authorized payment service provider for ";
}
$cust_cntry = urlencode(func_get_country($companyInfo['country'], 'co_full'));
$custom_text .= "<strong>{$companyInfo['cs_name']}</strong><BR>\n{$companyInfo['cs_support_email']}<BR>\n{$companyInfo['cs_support_phone']}";
if ($companyInfo['cd_custom_orderpage']) {
    $custom_text = $companyInfo['cd_custom_orderpage'];
}
if ($_SESSION['cs_support_email']) {
    $custom_text .= "<BR>Customer Service Email: <a href='mailto:{$_SESSION['cs_support_email']}'>{$_SESSION['cs_support_email']}</a><BR>";
}
$smarty->assign("custom_text", $custom_text);
if ($company_bank_id == -1 && !$testmode) {
    $strMessage = "INV";
    $msgdisplay = "This company has an invalid " . $_SESSION['ProcessingMode'] . " bank selected. Please contact your administrator.";
    $msgtodisplay = "<table width='350' height='100' align='center' valign='middle' style='border:1px solid black'><tr><td align='center' valign='middle'><font face='verdana' size='2' color='black'>{$msgdisplay}</font></td></tr><tr><td align='center'><a href='javascript:window.history.back()'><img border='0' src='https://www.etelegate.com/images/back.jpg'></a></td></tr></table>";
    toLog('error', 'customer', "Customer Fails to enter Order Page from '{$from_url}' because the bank was not set for this company (CC). Values: IP:{$ipaddress}  mt_reference_id={$reference_id}, mt_transaction_type={$ProcessingMode}, mt_subAccount={$mt_subAccount}, mt_prod_desc={$mt_prod_desc}, mt_prod_price={$mt_prod_price}, mt_etel900_subAccount={$mt_etel900_subAccount}", $companyid);
    print $msgtodisplay;
    exit;
Example #4
0
function cc_EuroPay_integration($transInfo, $bankInfo, $companyInfo)
{
    global $etel_fraud_limit;
    $response = "";
    $response['errormsg'] = "";
    $response['success'] = false;
    $response['td_bank_recieved'] = 'no';
    //include('snoopy/Snoopy.class.php');
    if ($bankInfo['bk_cc_support'] != 1) {
        $response['errormsg'] = "This bank does not support this Integration Function. Please contact an administrator.";
        return $response;
    }
    //$cust_state = func_get_state($transInfo['state'],'st_full');
    $expDate = explode("/", $transInfo['validupto']);
    $expYear = substr($expDate[0], -2, 2);
    $expMonth = $expDate[1];
    $expDate = $expMonth . $expYear;
    $cust_cntry = urlencode(func_get_country($transInfo['country'], 'co_ISO'));
    $cust_state = urlencode(func_get_state($transInfo['state'], 'st_abbrev'));
    //if(strlen($cust_state)>2)$cust_state="";
    if ($cust_cntry == 'United+States') {
        $cust_cntry = 'US';
    }
    //foreach($transInfo as $key => $info)
    //$transInfo[$key] = urlencode($info);
    //$cardtype = strtolower($transInfo['cardtype']);
    //if($cardtype!='mastercard')$cardtype='visa';
    $cardtype = 'visa';
    if (substr($transInfo['CCnumber'], 0, 1) == '5') {
        $cardtype = 'master';
    }
    //$bank_trans_id = rand(0,400000000);
    //$response['td_bank_transaction_id'] = $bank_trans_id;
    foreach ($transInfo as $key => $item) {
        $transInfo[$key] = urlencode($item);
    }
    if ($transInfo['amount'] < 5) {
        $transInfo['amount'] = 5;
    }
    $Pinfo = "";
    //  this is an unique ID defined by our system
    $Pinfo .= "ResellerID=" . $bankInfo['bk_additional_id'];
    //  this is an unique ID defined by our system
    $Pinfo .= "&MerchantSign=" . $bankInfo['bk_username'];
    //  also an unique ID defined by our System
    $Pinfo .= "&MerchantPassword="******"&ReferenceNumber=" . $transInfo['reference_number'];
    //  a (unique) reference transaction number of your system
    $Pinfo .= "&TransType=sale";
    //  the type of transaction you want to process
    //$Pinfo.="&TransactionID=".$bank_trans_id;  //  our reference transactionID of the sale or auth transaction
    $Pinfo .= "&CreditCardNumber=" . $transInfo['CCnumber'];
    //  the credit card number you want to bill
    $Pinfo .= "&CreditCardType=" . $cardtype;
    //  the type of the credit card. master and visa is supported
    $Pinfo .= "&CreditCardCVVCode=" . $transInfo['cvv'];
    //  the 3 digit number code on the back side of the credit card
    $Pinfo .= "&CreditCardExpireMonth=" . $expMonth;
    //  expire month of the credit card
    $Pinfo .= "&CreditCardExpireYear=20" . $expYear;
    //  expire year of the credit card
    $Pinfo .= "&Amount=" . number_format($transInfo['amount'], 2, ".", ",");
    //  amount of the transaction
    $Pinfo .= "&Currency=USD";
    //  currency of the transaction. Available currencies are EUR, USD
    $Pinfo .= "&CardholderFirstName=" . $transInfo['name'];
    //  card holder first name
    $Pinfo .= "&CardholderLastName=" . $transInfo['surname'];
    //  card holder last name
    $Pinfo .= "&CardholderAddress=" . $transInfo['address'];
    //  card holder address
    $Pinfo .= "&CardholderZipCode=" . $transInfo['zipcode'];
    //  card holder zip code
    $Pinfo .= "&CardholderCity=" . $transInfo['city'];
    //  card holder city
    $Pinfo .= "&CardholderState=" . $cust_state;
    //  card holder state (ISO 3166/2)
    $Pinfo .= "&CardholderCountry=" . $cust_cntry;
    //  card holder country (ISO 3166/2)
    $Pinfo .= "&CardholderEmail=" . $transInfo['email'];
    //  card holder email address
    $Pinfo .= "&CardholderIPAddress=" . $transInfo['ipaddress'];
    //  cardholder IP address
    $Pinfo .= "&MerchantInfo=www.maturebill.com;support@maturebill.com;";
    //  Please provide us following information always in following format:
    $Pinfo .= "&OrderInfo=" . $transInfo['productdescription'];
    //  an optional info field
    $output_url = "https://paygate.epg-1.com/cc3/start_transaction.php";
    $user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $Pinfo);
    curl_setopt($ch, CURLOPT_URL, $output_url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
    curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 500);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    $result = curl_exec($ch);
    curl_close($ch);
    $process_result = trim($result);
    $clean_data = str_replace(";", "&", trim($process_result));
    parse_str($clean_data, $resultAr);
    $response = "";
    $response['errormsg'] = $resultAr['ResultText'];
    if ($response['errormsg'] == 'status Offline') {
        $response['errormsg'] = 'SO Declined';
    }
    if ($response['errormsg'] == 'transaction type not valid') {
        $response['errormsg'] = 'TTNV Declined';
    }
    $response['errorcode'] = $resultAr['ResultCode'];
    $response['td_bank_transaction_id'] = $resultAr['TransactionID'];
    $response['td_process_result'] = $process_result;
    $response['td_process_query'] = $output_url . "?" . $Pinfo;
    $response['status'] = "D";
    $response['td_bank_recieved'] = 'yes';
    if (!is_array($resultAr)) {
        $response['td_bank_recieved'] = 'internalerror';
    }
    if ($resultAr['Result'] == "OK") {
        $response['errormsg'] = "Credit Card Accepted";
        $response['status'] = "A";
    }
    $response['success'] = true;
    return $response;
}
// resellerLedger.php:	The admin page functions for viewing the company transactions as a summary.
$etel_debug_mode = 0;
include "includes/sessioncheck.php";
require_once "../includes/dbconnection.php";
//include("includes/header.php");
$sessionAdmin = isset($HTTP_SESSION_VARS["sessionAdmin"]) ? $HTTP_SESSION_VARS["sessionAdmin"] : "";
$bi_ID = quote_smart($_REQUEST['bi_ID']);
$sql = "update cs_bank_invoice set `bi_download_count` = `bi_download_count`+1 where bi_ID ='{$bi_ID}'";
mysql_query($sql, $cnn_cs) or dieLog(" Cannot execute query. {$sql} Error:" . mysql_error());
$sql = "select * from cs_bank_invoice where bi_ID ='{$bi_ID}'";
$inv_details = mysql_query($sql, $cnn_cs) or dieLog(" Cannot execute query. {$sql} Error:" . mysql_error());
$invoiceInfo = mysql_fetch_assoc($inv_details);
foreach ($invoiceInfo as $key => $data) {
    $invoiceInfo[$key] = quote_smart($data);
}
$cust_cntry = func_get_country("USA", 'co_full');
$thisdate_id = date("Ymd");
$payout .= "Y,";
// 1	RecordType	C	1 char N,Y,A	See Additional Chart	Y	Y	Y
$payout .= date("m/d/Y") . ",";
// 2	Release Date	D 	Date	Date funds are released  (blank = no release)	N	N	N
$payout .= "Etel_" . $thisdate_id . ",";
// 3	PaymentID	C	50 chars	User Defined	Y	Y	Y
$payout .= ",";
// 4	PaymentReference	C	150 chars	User Defined	N	N	N
$payout .= ",";
// 5	PTSMID	I	9999999999	Payout MemberID	Y	Y	Y
$payout .= ",";
// 6	PTAccountID	I	9999999999	Payout Member Account ID	Y	Y	Y
$payout .= "'Etelegate',";
// 7	PTPayeeName	C	50 chars	Beneficiary Name	N	Y	Y
Example #6
0
function cc_LaserPay_integration($transInfo, $bankInfo, $companyInfo)
{
    global $etel_fraud_limit;
    $response = "";
    $response['errormsg'] = "Transaction could not be processed.";
    // Fraud Scrubbing
    $scrub_response = execute_scrub_tests(&$transInfo, &$bankInfo, &$companyInfo);
    if ($scrub_response != -1) {
        return $scrub_response;
    }
    $expDate = explode("/", $transInfo['validupto']);
    $expYear = substr($expDate[0], -2, 2);
    $expMonth = $expDate[1];
    //foreach($transInfo as $key=>$data)
    //	$transInfo[$key] = urlencode($data);
    $cust_cntry = urlencode(func_get_country($transInfo['country'], 'co_ISO'));
    $cardtype = $transInfo['cardtype'];
    if (strtolower($transInfo['cardtype']) == 'master') {
        $cardtype = 'MasterCard';
    }
    $output_url = "https://merchants.lazerpay.com/api/processing.cfm";
    if (!$transInfo['state']) {
        $transInfo['state'] = "NA";
    }
    $Pinfo .= "merchant_id=" . $bankInfo['bk_username'];
    // yes alphanumeric, max 32 characters Your Lazerpay merchandt identification id 12345
    $Pinfo .= "&secret_key=" . $bankInfo['bk_additional_id'];
    // yes alphanumeric, max 40 characters Your Lazerpay secret merchant key IMPORTANT: Keep this secret key hidden. Do not show it on your website. Make sure that it is not stated in the html code viewable to the clients. v7iTT5yq6_66eQ
    //$Pinfo.="&merchant_processing_url =".$output_url; // yes alphanumeric, max 255 characters The URL we provided you with to send the transaction data to. https://merchants.lazerpay.com/api/processing.cfm
    $Pinfo .= "&tr_id=" . $transInfo['reference_number'];
    // 	yes 	tr_amount
    $Pinfo .= "&tr_amount=" . round($transInfo['amount'] * 100);
    // 	yes 	tr_amount
    $Pinfo .= "&tr_callback_url=https://www.etelegate.com";
    // 	yes 	tr_amount
    $Pinfo .= "&tr_currency=USD";
    // 	yes 	atr_currency
    $Pinfo .= "&tr_testmode=no";
    // 	yes 	alphanumeric, max 3 characters 	As long as you test your processing interface please set
    $Pinfo .= "&tr_cc_type=" . $cardtype;
    // 	yes 	alphanumeric, max 20 characters 	Type of Credit Card, Visa or MasterCard 	Visa
    $Pinfo .= "&tr_cc_number=" . $transInfo['CCnumber'];
    // 	yes 	numeric, max 16 digits 	Credit Card Number 	4111111111111111
    $Pinfo .= "&tr_cc_exp_date=" . $expMonth . $expYear;
    // 	yes 	numeric, exactly 4 digits 	Card’s Expiration date Mandatory format mmyy 	1208
    $Pinfo .= "&tr_cvx2=" . $transInfo['cvv'];
    // 	yes 	numeric, max 4 digits 	Control Number on the reverse side of card 	123
    $Pinfo .= "&tr_submerchant=" . urlencode(quote_smart($companyInfo['cs_URL']));
    // 	no 	alphanumeric, max 200 characters 	The name / ID of the Submerchant this transaction is being processed for. 	www.webmerchant.com
    $Pinfo .= "&tr_description=" . $transInfo['description'];
    // 	no 	alphanumeric, max 200 characters 	The name / ID of the Submerchant this transaction is being processed for. 	www.webmerchant.com
    $Pinfo .= "&cus_title=";
    // 	no 	alphanumeric, max 40 characters 	The customer’s title 	Ms
    $Pinfo .= "&cus_firstname=" . $transInfo['name'];
    // 	yes 	alphanumeric, max 80 characters 	The customer’s first name 	Pamela
    $Pinfo .= "&cus_lastname=" . $transInfo['surname'];
    // 	yes 	alphanumeric, max 80 characters 	The customer’s last name 	Anitole
    $Pinfo .= "&cus_address1=" . $transInfo['address'];
    // 	yes 	alphanumeric, max 200 characters 	The customer’s address line 1 	55 Chevy Lane
    $Pinfo .= "&cus_address2=" . $transInfo['address2'];
    // 	no 	alphanumeric, max 200 characters 	The customer’s address line 2 	Apt. 2020
    $Pinfo .= "&cus_city=" . $transInfo['city'];
    // 	yes 	alphanumeric, max 200 characters 	The customer’s city 	Beverly Hills
    $Pinfo .= "&cus_state=" . $transInfo['state'];
    // 	yes 	alphanumeric, max 40 characters 	The customer’s state For US States please provide the 2 letter abbreviation from Appendix E outside US please provide the state’s full name, if there are no states in the respective country please provide ‘NA’.  This field cannot be left blank. 	CA
    $Pinfo .= "&cus_zip=" . $transInfo['zipcode'];
    // 	yes 	alphanumeric, max 12 characters 	The customer’s zip code 	99054
    $Pinfo .= "&cus_country=" . $cust_cntry;
    // 	yes 	alphanumeric, exactly 2 characters 	The customer’s country For the USA please provide ‘US’, outside of the US please provide the 2 letter code from Appendix C 	US
    $Pinfo .= "&cus_phone=" . $transInfo['phonenumber'];
    // 	no 	alphanumeric, max 40 	The customer’s phone no 	2143316684 			characters
    $Pinfo .= "&cus_cellphone=" . $transInfo[''];
    // 	no 	alphanumeric, max 80 characters 	The customer’s cell phone no
    $Pinfo .= "&cus_email=" . $transInfo['email'];
    // 	yes 	alphanumeric, max 80 characters 	The customer’s email address 	pammya@yahoo.com
    $Pinfo .= "&cus_ssn=0000";
    // 	yes 	numeric, exactly 4 digits 	Last 4 digits of Social Security Number Please note: For non US customers provide 0000 	123456789
    $Pinfo .= "&cus_birthday=000000";
    // 	yes 	numeric, exactly 6 digits 	The customer’s Birthday Mandatory format: mmddyy 	100972 	API_version 	yes 	numeric, max 2 digits 	The Version number of the API you are using. Please note: This parameter is optional for API versions 7 and lower. 	12
    $Pinfo .= "&API_version=12";
    // 	yes 	numeric, exactly 6 digits 	The customer’s Birthday Mandatory format: mmddyy 	100972 	API_version 	yes 	numeric, max 2 digits 	The Version number of the API you are using. Please note: This parameter is optional for API versions 7 and lower. 	12
    $Pinfo .= "&pay=LazerPay";
    // 	yes 	numeric, exactly 6 digits 	The customer’s Birthday Mandatory format: mmddyy 	100972 	API_version 	yes 	numeric, max 2 digits 	The Version number of the API you are using. Please note: This parameter is optional for API versions 7 and lower. 	12
    parse_str($Pinfo, $val);
    //foreach($val as $key=>$data)
    //$val[$key] = urlencode($data);
    $hashstring = $val['merchant_id'] . $val['tr_id'] . $val['tr_amount'] . $val['tr_currency'] . $val['tr_callback_url'] . $val['tr_description'] . $val['tr_testmode'] . $val['tr_cc_type'] . $val['tr_cc_number'] . $val['tr_cc_exp_date'] . $val['tr_cvx2'] . $val['tr_submerchant'] . $val['cus_title'] . $val['cus_firstname'] . $val['cus_lastname'] . $val['cus_address1'] . $val['cus_address2'] . $val['cus_city'] . $val['cus_state'] . $val['cus_zip'] . $val['cus_country'] . $val['cus_phone'] . $val['cus_cellphone'] . $val['cus_email'] . $val['cus_ssn'] . $val['cus_birthday'] . $val['secret_key'];
    $md5string = md5($hashstring);
    $Pinfo .= "&checksum={$md5string}";
    // 	yes 	numeric, exactly 6 digits 	The customer’s Birthday Mandatory format: mmddyy 	100972 	API_version 	yes 	numeric, max 2 digits 	The Version number of the API you are using. Please note: This parameter is optional for API versions 7 and lower. 	12
    $process_result = http_post('ssl://merchants.lazerpay.com', 443, $output_url, $Pinfo);
    $xml = xml2array($process_result);
    $status = $xml['ProcessingResult']['TR_SUCCESS'];
    $ProcessStatusText = $xml['ProcessingResult']['TR_RESULT'];
    $ProcessOrderID = $xml['ProcessingResult']['TR_ID'];
    $response['success'] = true;
    $response['status'] = "D";
    $response['td_process_query'] = $output_url . "?" . $Pinfo;
    $response['td_process_result'] = $process_result;
    $response['td_bank_recieved'] = 'yes';
    if ($process_result == '0: Success') {
        $response['td_bank_recieved'] = 'internalerror';
    }
    if (strtolower($status) == "yes") {
        $response['status'] = "A";
        $response['errormsg'] = $ProcessStatusText;
    }
    $response['td_bank_transaction_id'] = $ProcessOrderID;
    return $response;
}