Version 2.3.6
This commit is contained in:
1 parent
a3bb603c96
commit
19b38c7c74
764 files changed
+143731
-118164
No files matched your search
@@ -113,26 +113,31 @@ class class_gw_module EXTENDS class_gateway
|
||||
// Generate crypt string
|
||||
//---------------------------------------
|
||||
|
||||
$plain = "VendorTxCode=" . rand(0,1000)."x{$items['member_unique_id']}x{$items['package_id']}x0" . "&";
|
||||
$plain = "VendorTxCode=" . (rand(0,32000)*rand(0,32000))."x{$items['member_unique_id']}x{$items['package_id']}x0" . "&";
|
||||
$plain .= "Amount=" . $items['package_cost'] . "&";
|
||||
$plain .= "Currency=" . $items['currency_code'] . "&";
|
||||
$plain .= "Description=" . $items['package_title'] ."&";
|
||||
$plain .= "SuccessURL=" . GW_URL_VALIDATE . "&";
|
||||
$plain .= "FailureURL=" . GW_URL_VALIDATE . "&";
|
||||
$plain .= "SuccessURL=" . GW_URL_VALIDATE . "&verification=" . md5( $items['member_unique_id'] . $items['package_id'] . $this->ipsclass->vars['sql_pass'] ) . "&";
|
||||
$plain .= "FailureURL=" . GW_URL_VALIDATE . "&verification=" . md5( $items['member_unique_id'] . $items['package_id'] . $this->ipsclass->vars['sql_pass'] ) . "&";
|
||||
$plain .= "CustomerName=&";
|
||||
$plain .= "CustomerEmail=" . $items['member_email'] . "&";
|
||||
$plain .= "VendorEMail=" . $items['company_email'] . "&";
|
||||
$plain .= "DeliveryAddress=&";
|
||||
$plain .= "DeliveryPostCode=&";
|
||||
$plain .= "BillingAddress=&";
|
||||
$plain .= "BillingPostCode=";
|
||||
$plain .= "BillingPostCode=&";
|
||||
$plain .= "ContactNumber=&";
|
||||
$plain .= "ContactFax=&";
|
||||
$plain .= "AllowGiftAid=&";
|
||||
$plain .= "ApplyAVSCV2=&";
|
||||
$plain .= "Apply3DSecure=";
|
||||
|
||||
$crypt = base64_encode( $this->_simple_xor( $plain, $password ) );
|
||||
|
||||
$this->core_add_hidden_field( "Crypt" , $crypt );
|
||||
$this->core_add_hidden_field( "Vendor" , $username );
|
||||
$this->core_add_hidden_field( "TxType" , 'PAYMENT' );
|
||||
$this->core_add_hidden_field( "VPSProtocol" , '2.21' );
|
||||
$this->core_add_hidden_field( "VPSProtocol" , '2.22' );
|
||||
|
||||
return $this->core_compile_hidden_fields();
|
||||
}
|
||||
@@ -150,26 +155,31 @@ class class_gw_module EXTENDS class_gateway
|
||||
// Generate crypt string
|
||||
//---------------------------------------
|
||||
|
||||
$plain = "VendorTxCode=" . rand(0,1000)."x{$items['member_unique_id']}x{$items['package_id']}x{$items['ttr_package_id']}" . "&";
|
||||
$plain = "VendorTxCode=" . (rand(0,32000)*rand(0,32000))."x{$items['member_unique_id']}x{$items['package_id']}x{$items['ttr_package_id']}" . "&";
|
||||
$plain .= "Amount=" . $items['ttr_balance'] . "&";
|
||||
$plain .= "Currency=" . $items['currency_code'] . "&";
|
||||
$plain .= "Description=" . $items['package_title'] ."&";
|
||||
$plain .= "SuccessURL=" . GW_URL_VALIDATE . "&";
|
||||
$plain .= "FailureURL=" . GW_URL_VALIDATE . "&";
|
||||
$plain .= "SuccessURL=" . GW_URL_VALIDATE . "&verification=" . md5( $items['member_unique_id'] . $items['package_id'] . $this->ipsclass->vars['sql_pass'] ) . "&";
|
||||
$plain .= "FailureURL=" . GW_URL_VALIDATE . "&verification=" . md5( $items['member_unique_id'] . $items['package_id'] . $this->ipsclass->vars['sql_pass'] ) . "&";
|
||||
$plain .= "CustomerName=&";
|
||||
$plain .= "CustomerEmail=" . $items['member_email'] . "&";
|
||||
$plain .= "VendorEMail=" . $items['company_email'] . "&";
|
||||
$plain .= "DeliveryAddress=&";
|
||||
$plain .= "DeliveryPostCode=&";
|
||||
$plain .= "BillingAddress=&";
|
||||
$plain .= "BillingPostCode=";
|
||||
|
||||
$plain .= "BillingPostCode=&";
|
||||
$plain .= "ContactNumber=&";
|
||||
$plain .= "ContactFax=&";
|
||||
$plain .= "AllowGiftAid=&";
|
||||
$plain .= "ApplyAVSCV2=&";
|
||||
$plain .= "Apply3DSecure=";
|
||||
|
||||
$crypt = base64_encode( $this->_simple_xor( $plain, $password ) );
|
||||
|
||||
$this->core_add_hidden_field( "Crypt" , $crypt );
|
||||
$this->core_add_hidden_field( "Vendor" , $username );
|
||||
$this->core_add_hidden_field( "TxType" , 'PAYMENT' );
|
||||
$this->core_add_hidden_field( "VPSProtocol" , '2.21' );
|
||||
$this->core_add_hidden_field( "VPSProtocol" , '2.22' );
|
||||
|
||||
return $this->core_compile_hidden_fields();
|
||||
}
|
||||
@@ -292,8 +302,9 @@ class class_gw_module EXTENDS class_gateway
|
||||
'purchase_package_id'=> intval($purchase_package_id),
|
||||
'current_package_id' => intval($cur_sub_id),
|
||||
'verified' => TRUE,
|
||||
'verification' => $this->ipsclass->input['verification'],
|
||||
'subscription_id' => '0-'.intval($member_id),
|
||||
'transaction_id' => $values['VPSTxID'] );
|
||||
'transaction_id' => $values['VPSTxId'] );
|
||||
|
||||
//--------------------------------------
|
||||
// Sort out payment status
|
||||
@@ -432,8 +443,20 @@ class class_gw_module EXTENDS class_gateway
|
||||
|
||||
function _get_token($thisString)
|
||||
{
|
||||
|
||||
$Tokens = array("Status","StatusDetail","VendorTxCode","VPSTxID","TxAuthNo","Amount","AVSCV2");
|
||||
$Tokens = array(
|
||||
"Status",
|
||||
"StatusDetail",
|
||||
"VendorTxCode",
|
||||
"VPSTxId",
|
||||
"TxAuthNo",
|
||||
"Amount",
|
||||
"AVSCV2",
|
||||
"AddressResult",
|
||||
"PostCodeResult",
|
||||
"CV2Result",
|
||||
"GiftAid",
|
||||
"3DSecureStatus",
|
||||
"CAVV" );
|
||||
|
||||
$output = array();
|
||||
$resultArray = array();
|
||||
@@ -468,6 +491,27 @@ class class_gw_module EXTENDS class_gateway
|
||||
return $output;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INSTALL Gateway...
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function install_gateway()
|
||||
{
|
||||
//--------------------------------------
|
||||
// DB queries
|
||||
//--------------------------------------
|
||||
|
||||
$this->db_info = array( 'human_title' => 'Protx',
|
||||
'human_desc' => 'Accepts all major credit cards',
|
||||
'module_name' => $this->i_am,
|
||||
'allow_creditcards' => 1,
|
||||
'allow_auto_validate' => 1,
|
||||
'default_currency' => 'GBP' );
|
||||
|
||||
|
||||
$this->install_lang = array( 'gw_'.$this->i_am => "Click the button below to complete this order via Protx's website" );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user