This commit is contained in:
David Bomba 2021-09-29 10:52:09 +10:00
parent 6a51bc258c
commit 45b4267916
2 changed files with 6 additions and 6 deletions

View File

@ -162,8 +162,8 @@ class Token
protected function generate_parameter_string( $api_data, $sort_data_before_merge = true, $skip_empty_values = true ) { protected function generate_parameter_string( $api_data, $sort_data_before_merge = true, $skip_empty_values = true ) {
// if sorting is required the passphrase should be added in before sort. // if sorting is required the passphrase should be added in before sort.
if ( ! empty( $this->payfast->company_gateway->getConfigField('passPhrase') ) && $sort_data_before_merge ) if ( ! empty( $this->payfast->company_gateway->getConfigField('passphrase') ) && $sort_data_before_merge )
$api_data['passphrase'] = $this->payfast->company_gateway->getConfigField('passPhrase'); $api_data['passphrase'] = $this->payfast->company_gateway->getConfigField('passphrase');
if ( $sort_data_before_merge ) { if ( $sort_data_before_merge ) {
ksort( $api_data ); ksort( $api_data );
@ -186,7 +186,7 @@ class Token
if ( $sort_data_before_merge ) { if ( $sort_data_before_merge ) {
$parameter_string = rtrim( $parameter_string, '&' ); $parameter_string = rtrim( $parameter_string, '&' );
} elseif ( ! empty( $this->pass_phrase ) ) { } elseif ( ! empty( $this->pass_phrase ) ) {
$parameter_string .= 'passphrase=' . urlencode( $this->payfast->company_gateway->getConfigField('passPhrase') ); $parameter_string .= 'passphrase=' . urlencode( $this->payfast->company_gateway->getConfigField('passphrase') );
} else { } else {
$parameter_string = rtrim( $parameter_string, '&' ); $parameter_string = rtrim( $parameter_string, '&' );
} }

View File

@ -72,7 +72,7 @@ class PayFastPaymentDriver extends BaseDriver
[ [
'merchantId' => $this->company_gateway->getConfigField('merchantId'), 'merchantId' => $this->company_gateway->getConfigField('merchantId'),
'merchantKey' => $this->company_gateway->getConfigField('merchantKey'), 'merchantKey' => $this->company_gateway->getConfigField('merchantKey'),
'passPhrase' => $this->company_gateway->getConfigField('passPhrase'), 'passPhrase' => $this->company_gateway->getConfigField('passphrase'),
'testMode' => $this->company_gateway->getConfigField('testMode') 'testMode' => $this->company_gateway->getConfigField('testMode')
] ]
); );
@ -147,8 +147,8 @@ class PayFastPaymentDriver extends BaseDriver
} }
} }
if($this->company_gateway->getConfigField('passPhrase')) if($this->company_gateway->getConfigField('passphrase'))
$fields['passphrase'] = $this->company_gateway->getConfigField('passPhrase'); $fields['passphrase'] = $this->company_gateway->getConfigField('passphrase');
nlog(http_build_query($fields)); nlog(http_build_query($fields));