Skip to content

Commit

Permalink
fixed '_secret' <- 'secret'
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Oct 31, 2015
1 parent 81c5893 commit b075280
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Merchant.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function validateNewVersion($data)
}
unset($iks['ik_sign']);
foreach ($iks as $k=>$v) if (substr($k,0,3)!='ik_') unset($iks[$k]);
array_push($iks, $this->secret);
array_push($iks, $this->_secret);
ksort($iks, SORT_STRING);
$hash = base64_encode(md5(implode(':',$iks), true));
if ($hash != strtolower($data['ik_sign'])) {
Expand All @@ -114,7 +114,7 @@ public function validateOldVersion($data)
}
unset($iks['ik_sign_hash'], $iks['ik_payment_desc'], $iks['ik_payment_timestamp']);
foreach ($iks as $k=>$v) if (substr($k,0,3)!='ik_') unset($iks[$k]);
array_push($iks, $this->secret);
array_push($iks, $this->_secret);
$hash = md5(implode(':', $iks));
if ($hash != strtolower($data['ik_sign_hash'])) {
return 'Wrong hash';
Expand Down

0 comments on commit b075280

Please sign in to comment.