Closed Quetzacoalt91 closed 10 years ago
We still can improve it:
implode(...)
which will do the job for you.Here is a suggestion for this function, I let you see if it does what we expect from her :)
public function verifyPaymentDatafeed($dataAry, $secure_hash)
{
return $secure_hash == sha1(implode('|', $dataAry));
}
In unionpay.php, the function verifyPaymentDatafeed(...) needs (too ?) many arguments. It would be better if the function is called this way:
public function verifyPaymentDatafeed($data)
instead ofpublic function verifyPaymentDatafeed($src, $prc, $success_code, $merchant_reference_number, $unionpaydollar_reference_number, $currency_code, $amount, $payer_authentication_status, $secure_hash_secret, $secure_hash)
The whole arguments would be store in the variable $data, defined as an array.