Minor fixes for Payfast

This commit is contained in:
David Bomba 2021-07-10 16:11:58 +10:00
parent 82b423442f
commit fd136a93ab
2 changed files with 5 additions and 1 deletions

View File

@ -91,7 +91,7 @@ class Token
'passphrase' => $this->payfast->company_gateway->getConfigField('passphrase'),
];
$header['signature'] = $this->payfast->genSig(array_merge($header, $body));
$header['signature'] = $this->genSig(array_merge($header, $body));
$result = $this->send($header, $body, $cgt->token);

View File

@ -72,6 +72,7 @@ class PayFastPaymentDriver extends BaseDriver
{
try{
$this->payfast = new PayFastPayment(
[
'merchantId' => $this->company_gateway->getConfigField('merchantId'),
@ -80,8 +81,11 @@ class PayFastPaymentDriver extends BaseDriver
'testMode' => $this->company_gateway->getConfigField('testMode')
]
);
} catch(Exception $e) {
echo '##PAYFAST## There was an exception: '.$e->getMessage();
}
return $this;