<html>
<head>
<title>Untitled</title>
<link rel="stylesheet" type="text/css" href="ach.css">
</head>
<body>
<?
if ($actn=='pay'){
require ('ACH_core.class.php');
require ('ACH.class.php');
$payarr = array_merge($_POST, array('pg_customer_ip_address'=>$ip));
$payment = new ACH($_POST['pg_merchant_id'], $_POST['pg_password'], $payarr, array('actn') );
echo $payment->getDisplayText(
array(
'A'=>'', //link to display in left footer for Approved payments
'D'=>'<a href=javascript:history.back()><< Go Back</a>',//link in left footer for Declined payments
'E'=>'<a href=javascript:history.back()><< Go Back</a>'),//link in left footer for Error payments
array(
'A'=>'<a href=http://www.paymentsgateway.net>To PaymentsGateway >></a>',// right footer
'D'=>'<a href=http://www.paymentsgateway.net>To PaymentsGateway >></a>',// right footer
'E'=>'<a href=http://www.paymentsgateway.net>To PaymentsGateway >></a>')// right footer
);
} else {
$inputs = array (
'pg_merchant_id' => "", 'pg_password' => "",
'pg_transaction_type' => "20", 'pg_total_amount' => "1",
// EFT
'ecom_payment_check_trn' => "123456", 'ecom_payment_check_account' => "123456",
'ecom_payment_check_account_type' => "C",
// IDs
'pg_consumer_id' => "", 'ecom_consumerorderid' => "",
// BILLING INFO
'ecom_billto_postal_name_first' => "Joe", 'ecom_billto_postal_name_last' => "Payer",
'ecom_billto_postal_street_line1' => "123 ACH Lane", 'ecom_billto_postal_street_line2' => "101",
'ecom_billto_postal_city' => "San Diego", 'ecom_billto_postal_stateprov' => "CA",
'ecom_billto_postal_postalcode' => "12345", 'ecom_billto_postal_countrycode' => "",
'ecom_billto_telecom_phone_number' => "", 'ecom_billto_online_email' => "",
'pg_billto_ssn' => "", 'pg_billto_dl_number' => "",
'pg_billto_dl_state' => ""
);
?>
<form action=ach_test.php method=post>
<input type=hidden name='actn' value='pay'>
<table border=0>
<?
foreach($inputs as $k=>$v){
?>
<tr><td><?= $k ?> : </td><td><input type=text name='<?= $k ?>' value='<?= $v ?>'></td></tr>
<?
}
?>
</table>
<input type=submit>
</form>
<?
}
?>
</body>
</html>
|