Initial commit
This commit is contained in:
52
production/modules/gateway/Protx/process.inc.php
Normal file
52
production/modules/gateway/Protx/process.inc.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| CubeCart 4
|
||||
| ========================================
|
||||
| CubeCart is a registered trade mark of Devellion Limited
|
||||
| Copyright Devellion Limited 2006. All rights reserved.
|
||||
| Devellion Limited,
|
||||
| 5 Bridge Street,
|
||||
| Bishops Stortford,
|
||||
| HERTFORDSHIRE.
|
||||
| CM23 2JU
|
||||
| UNITED KINGDOM
|
||||
| http://www.devellion.com
|
||||
| UK Private Limited Company No. 5323904
|
||||
| ========================================
|
||||
| Web: http://www.cubecart.com
|
||||
| Email: info (at) cubecart (dot) com
|
||||
| License Type: CubeCart is NOT Open Source Software and Limitations Apply
|
||||
| Licence Info: http://www.cubecart.com/site/faq/license.php
|
||||
+--------------------------------------------------------------------------
|
||||
| process.inc.php
|
||||
| ========================================
|
||||
| Process Protx Gateway
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
include("transfer.inc.php");
|
||||
|
||||
$Decoded = SimpleXor(base64Decode($_REQUEST['crypt']),$module['passphrase']);
|
||||
|
||||
// ** Split out the useful information into variables we can use **
|
||||
$values = getToken($Decoded);
|
||||
|
||||
$customer = $db->select("SELECT `customer_id`, `prod_total` FROM ".$glob['dbprefix']."CubeCart_order_sum WHERE `cart_order_id` = ".$db->MySQLSafe($_GET['cart_order_id']));
|
||||
|
||||
$transData['customer_id'] = $customer[0]["customer_id"];
|
||||
$transData['gateway'] = "Protx";
|
||||
$transData['trans_id'] = "";
|
||||
$transData['order_id'] = $_GET['cart_order_id'];
|
||||
$transData['amount'] = $customer[0]["prod_total"];
|
||||
$transData['status'] = $values['Status'];
|
||||
|
||||
if($values['Status']=="OK"){
|
||||
$paymentResult = 2;
|
||||
$order->orderStatus(3,$_GET['cart_order_id']);
|
||||
$transData['notes'] = "Card charged successfully.";
|
||||
} else {
|
||||
$paymentResult = 1;
|
||||
$transData['notes'] = "Payment failed.";
|
||||
}
|
||||
$order->storeTrans($transData);
|
||||
?>
|
||||
Reference in New Issue
Block a user