<?

include('def.php');

$USER = $_SERVER['SCRIPT_FILENAME'];
$USER = str_replace('/home', '', $USER);
$USER = strtok($USER, '/');
//echo $USER;
// Load API class
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
$wrenchboard = new $wrenchboard_class();


$data['member_id'] = 3;
$data['action'] = 33020;


$data["InitiatingEntityCode"] = "MBA"; //isset($_POST["InitiatingEntityCode"])?$_POST["InitiatingEntityCode"]:"";
// $data["senderid"] = 1;
$data["senderid"] = "1"; // isset($_POST["customerid"])?((int)$_POST["customerid"]):0;
$data["InitiatingAmount"] = 120000 + rand(999, 99999);
$data["Fee"] = 120;
$data["InitiatingChannel"] = 7;
$data["InitiatingPaymentMethodCode"] = "CA";
$data["InitiatingCurrencyCode"] = '566'; // 566 - NRN - Naira

$data["recipientid"] = 1;
$data["TerminatingPaymentMethodCode"] = "AC";
$data["TerminatingAmount"] = $data["InitiatingAmount"];
$data["TerminatingCurrencyCode"] = '566'; // 566 - NRN - Naira
$data["TerminatingCountryCode"] = 'NG'; // NG - Nigeria
$data["TerminatingAccountNumber"] = "";
//  $data["TerminatingAccountType"] = isset($_POST["TerminatingAccountType"])?$_POST["TerminatingAccountType"]:"";
$data["TerminatingEntityCode"] = "";

$data["transaction_id"] = "T".rand(120000,999999);
print_r($data);
$out = array();

$ret = $wrenchboard->wrenchboard_api($data, $out);
echo "<hr>";

print_r($out);
var_dump($ret);


/*
 * 
 * //**************************************************************
#define  WRENCHBOARD_SMONEY_START 	    33000

#define  WRENCHBOARD_SMONEY_ADDRECIPIENT   33010
#define  WRENCHBOARD_SMONEY_MEMBER         33020

#define  WRENCHBOARD_SMONEY_END         33999
//**************************************************************
 * 
 */
?>



