|
@@ -89,7 +89,8 @@ class SenangPayDriver implements PaymentGatewayDriver
|
89
|
89
|
public function computeHash($payload)
|
90
|
90
|
{
|
91
|
91
|
$query = http_build_query($payload);
|
92
|
|
- $query = preg_replace('/(^|&)hash=[^&]*($|&)/','$1hash=[HASH]$2', $query);
|
|
92
|
+ $key = preg_quote(http_build_query([$this->keyMap['hash']=>'']), '/');
|
|
93
|
+ $query = preg_replace('/(^|&)'.$key.'[^&]*($|&)/','$1hash=[HASH]$2', $query);
|
93
|
94
|
return md5($this->secret_key . '?' . $query);
|
94
|
95
|
}
|
95
|
96
|
}
|