Closed kornerson closed 3 years ago
In the function
public function check($key='', $postData)
you get an error when trying to run the code on Php8.
To fix this, just rewrite the function like this:
public function check(string $key, $postData) { if (!isset($postData)) { throw new TpvException("Add data return of bank"); } $parameters = $postData["Ds_MerchantParameters"]; $signatureReceived = $postData["Ds_Signature"]; $signature = $this->generateMerchantSignatureNotification($key==null?"":$key, $parameters); return ($signature === $signatureReceived); }
Would be better to have the key at the end, but I have no time to get deeper into the code to check where this is called.
Take this as a quick fix until is patched in the source code.
Fixed to PHP 8.0
In the function
public function check($key='', $postData)
you get an error when trying to run the code on Php8.
To fix this, just rewrite the function like this:
Would be better to have the key at the end, but I have no time to get deeper into the code to check where this is called.
Take this as a quick fix until is patched in the source code.