payment_name = "2Checkout";
$this->payment_site = "http://www.2checkout.com/";
$this->author_name = "Michael K. Squires";
$this->author_site = "http://www.burnwave.com/";
$this->checkout_options = 0;
}
function payment_config(){
global $prefix, $db;
$result = $db->sql_query("SELECT * FROM ".$prefix."_cart_payments_options_2checkout");
$config = $db->sql_fetchrow($result);
return $config;
}
function admin($function){
switch($function){
case "install": $this->admin_install(); break;
case "options": $this->admin_options(); break;
case "update": $this->admin_update(); break;
case "uninstall": $this->admin_uninstall(); break;
}
}
function admin_install() {
global $prefix, $db;
$db->sql_query("CREATE TABLE ".$prefix."_cart_payments_options_2checkout (sellerID int(11) NOT NULL default '0', tmode varchar(255) NOT NULL default '', ereceipt varchar(255) NOT NULL default '')");
$db->sql_query("INSERT INTO ".$prefix."_cart_payments_options_2checkout VALUES (12345, 'Y', 'FALSE')");
}
function admin_options(){
global $prefix, $db, $admin_file;
$tcheckout_config = $this->payment_config();
echo "
";
OpenTable();
echo "
"._EMPORIUM_MODULE_PAYMENT_2CHECKOUT_CLICKTO."
";
$payment_config = $this->payment_config();
$orderInfo = cartorderinfo($this->order_id);
$grandTotal = sprintf("%01.2f", $orderInfo['GrandTotal']);
if($orderInfo['billAddress2'] != ""){
$billAddress = $orderInfo['billAddress1'] . ", " . $orderInfo['billAddress2'];
} else {
$billAddress = $orderInfo['billAddress1'];
}
echo "\n\n