Version 2.3.6
This commit is contained in:
1 parent
a3bb603c96
commit
19b38c7c74
764 files changed
+143731
-118164
No files matched your search
@@ -114,15 +114,22 @@ class class_gw_module EXTENDS class_gateway
|
||||
$this->core_add_hidden_field( "x_amount" , $items['package_cost'] );
|
||||
$this->core_add_hidden_field( "x_currency_code" , $items['currency_code'] );
|
||||
$this->core_add_hidden_field( "x_description" , $items['package_title'] );
|
||||
$this->core_add_hidden_field( "x_relay_response" , 'TRUE' );
|
||||
#$this->core_add_hidden_field( "x_relay_response" , 'TRUE' );
|
||||
|
||||
$this->core_add_hidden_field( "x_receipt_link_method" , 'POST' );
|
||||
$this->core_add_hidden_field( "x_receipt_link_text" , 'Return to our site!' );
|
||||
$this->core_add_hidden_field( "x_receipt_link_url" , GW_URL_VALIDATE . "&verification=" . md5( $items['member_unique_id'] . $items['package_id'] . $this->ipsclass->vars['sql_pass'] ) );
|
||||
|
||||
$this->core_add_hidden_field( "x_show_form" , 'PAYMENT_FORM' );
|
||||
$this->core_add_hidden_field( "x_test_request" , 'FALSE' );
|
||||
$this->core_add_hidden_field( "x_fp_hash" , $fp_hash );
|
||||
$this->core_add_hidden_field( "x_fp_timestamp" , $fp_time );
|
||||
$this->core_add_hidden_field( "x_fp_sequence" , $fp_seq );
|
||||
$this->core_add_hidden_field( "x_relay_url" , GW_URL_VALIDATE );
|
||||
#$this->core_add_hidden_field( "x_relay_url" , GW_URL_VALIDATE );
|
||||
$this->core_add_hidden_field( "x_invoice_num" , $fp_time.'-'.$fp_seq.'-'.$items['currency_code'] );
|
||||
|
||||
//$this->core_add_hidden_field( "verification" , md5( $items['member_unique_id'] . $items['package_id'] . $this->ipsclass->vars['sql_pass'] ) );
|
||||
|
||||
return $this->core_compile_hidden_fields();
|
||||
}
|
||||
|
||||
@@ -142,15 +149,22 @@ class class_gw_module EXTENDS class_gateway
|
||||
$this->core_add_hidden_field( "x_amount" , $items['ttr_balance'] );
|
||||
$this->core_add_hidden_field( "x_currency_code" , $items['currency_code'] );
|
||||
$this->core_add_hidden_field( "x_description" , $items['package_title'] );
|
||||
$this->core_add_hidden_field( "x_relay_response" , 'TRUE' );
|
||||
|
||||
$this->core_add_hidden_field( "x_receipt_link_method" , 'POST' );
|
||||
$this->core_add_hidden_field( "x_receipt_link_text" , 'Return to our site!' );
|
||||
$this->core_add_hidden_field( "x_receipt_link_url" , GW_URL_VALIDATE . "&verification=" . md5( $items['member_unique_id'] . $items['package_id'] . $this->ipsclass->vars['sql_pass'] ) );
|
||||
|
||||
#$this->core_add_hidden_field( "x_relay_response" , 'TRUE' );
|
||||
$this->core_add_hidden_field( "x_show_form" , 'PAYMENT_FORM' );
|
||||
$this->core_add_hidden_field( "x_test_request" , 'FALSE' );
|
||||
$this->core_add_hidden_field( "x_fp_hash" , $fp_hash );
|
||||
$this->core_add_hidden_field( "x_fp_timestamp" , $fp_time );
|
||||
$this->core_add_hidden_field( "x_fp_sequence" , $fp_seq );
|
||||
$this->core_add_hidden_field( "x_relay_url" , GW_URL_VALIDATE );
|
||||
#$this->core_add_hidden_field( "x_relay_url" , GW_URL_VALIDATE );
|
||||
$this->core_add_hidden_field( "x_invoice_num" , $fp_time.'-'.$fp_seq.'-'.$items['currency_code'] );
|
||||
|
||||
//$this->core_add_hidden_field( "verification" , md5( $items['member_unique_id'] . $items['package_id'] . $this->ipsclass->vars['sql_pass'] ) );
|
||||
|
||||
return $this->core_compile_hidden_fields();
|
||||
}
|
||||
|
||||
@@ -235,14 +249,14 @@ class class_gw_module EXTENDS class_gateway
|
||||
// Check hash
|
||||
//--------------------------------------
|
||||
|
||||
list( $fp_time, $fp_seq, $currency_code, ) = explode( '-', $_REQUEST['x_invoice_num'] );
|
||||
list( $purchase_package_id, $member_id, $cur_sub_id, ) = explode( 'x', trim($_REQUEST['x_cust_id']) );
|
||||
list( $fp_time, $fp_seq, $currency_code, ) = explode( '-', $this->ipsclass->input['x_invoice_num'] );
|
||||
list( $purchase_package_id, $member_id, $cur_sub_id, ) = explode( 'x', trim($this->ipsclass->input['x_cust_id']) );
|
||||
|
||||
$in_hash = $_REQUEST['x_md5_hash'] ? $_REQUEST['x_md5_hash'] : $_REQUEST['x_MD5_Hash'];
|
||||
$in_hash = $this->ipsclass->input['x_md5_hash'] ? $this->ipsclass->input['x_md5_hash'] : $this->ipsclass->input['x_MD5_Hash'];
|
||||
$txn_key = $extra['company_email'];
|
||||
$fp_hash = $this->my_calculatefp( $extra['vendor_id'], $txn_key, $_REQUEST['x_amount'], intval($fp_seq), intval($fp_time), trim($currency_code) );
|
||||
$an_response_code = $_REQUEST['x_response_code'];
|
||||
$test_hash = strtoupper( md5( $extra['vendor_id'] . $_REQUEST['x_trans_id'] . $_REQUEST['x_amount']) );
|
||||
$fp_hash = $this->my_calculatefp( $extra['vendor_id'], $txn_key, $this->ipsclass->input['x_amount'], intval($fp_seq), intval($fp_time), trim($currency_code) );
|
||||
$an_response_code = $this->ipsclass->input['x_response_code'];
|
||||
$test_hash = strtoupper( md5( $extra['vendor_id'] . $this->ipsclass->input['x_trans_id'] . $this->ipsclass->input['x_amount']) );
|
||||
|
||||
if ( $in_hash != $test_hash )
|
||||
{
|
||||
@@ -258,21 +272,20 @@ class class_gw_module EXTENDS class_gateway
|
||||
$this->error = 'not_valid';
|
||||
return array( 'verified' => FALSE );
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------
|
||||
// Populate return array
|
||||
//--------------------------------------
|
||||
|
||||
|
||||
|
||||
$return = array( 'currency_code' => trim($currency_code),
|
||||
'payment_amount' => $_REQUEST['x_amount'],
|
||||
'payment_amount' => $this->ipsclass->input['x_amount'],
|
||||
'member_unique_id' => intval($member_id),
|
||||
'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' => $_REQUEST['x_trans_id'] );
|
||||
'transaction_id' => $this->ipsclass->input['x_trans_id'] );
|
||||
|
||||
//--------------------------------------
|
||||
// Sort out payment status
|
||||
|
||||
Reference in new issue
Block a user