mySQLSafe($_REQUEST['type'])." AND folder=".$db->mySQLSafe($_REQUEST['module'])." AND status = 1"; $gatewayStatus = $db->select($query); } if(!$gatewayStatus) exit; $modulePath = "modules".CC_DS.$_REQUEST['type'].CC_DS.sanitizeVar($_REQUEST['module']).CC_DS; $module = fetchDbConfig($gatewayStatus[0]['folder']); switch(sanitizeVar($_REQUEST['cmd'])) { ## Payment Gateway Callbacks case "call": $moduleFullPath = $modulePath."call.inc.php"; break; ## Process Payment case "process": $moduleFullPath = $modulePath."process.inc.php"; break; } if (file_exists($moduleFullPath)) { require_once "classes".CC_DS."cart".CC_DS."order.php"; $order = new order(); include_once $moduleFullPath; } else { die("Module path doesn't exist!"); } } # Worldpay fix #if ($_REQUEST['cmd'] == "process" && $_REQUEST['module'] != "WorldPay") { if ($_REQUEST['cmd'] == "process") { /* 1 = Payment Failed link to try again 2 = Payment successful and complete 3 = Payment may or may not have been approved yet */ if (!isset($paymentResult)) $paymentResult = "3"; httpredir("index.php?_g=co&_a=confirmed&s=".$paymentResult); } ?>