diff --git a/class/paycomet_bankstore.php b/class/paycomet_bankstore.php index b568809..b2adabd 100644 --- a/class/paycomet_bankstore.php +++ b/class/paycomet_bankstore.php @@ -1591,7 +1591,6 @@ private function GenerateHash($operationdata, $operationtype) */ private function ComposeURLParams($operationdata, $operationtype) { - $secureurlhash = false; $data = array(); $data["MERCHANT_MERCHANTCODE"] = $this->merchantCode; @@ -1752,27 +1751,10 @@ private function ComposeURLParams($operationdata, $operationtype) } } - $content = ""; - foreach ($data as $key => $value) { - if ($content != "") { - $content .= "&"; - } - - $content .= urlencode($key) . "=" . urlencode($value); - } - - $data["VHASH"] = hash('sha512', md5($content.md5($this->password))); - - $secureurlhash = ""; - foreach ($data as $key => $value) { - if ($secureurlhash != "") { - $secureurlhash .= "&"; - } - - $secureurlhash .= urlencode($key) . "=" . urlencode($value); - } + $content = http_build_query($data); + $VHASH = hash('sha512', md5($content.md5($this->password))); - return $secureurlhash; + return $content."&VHASH=$VHASH"; } /**