Skip to content

Commit

Permalink
Merge pull request #170 from FikretCin/ziraat-hash-mismatch-fix
Browse files Browse the repository at this point in the history
Ziraat HashMismatch Exception Hk.
  • Loading branch information
nuryagdym authored Dec 12, 2023
2 parents f2640ff + b2dcf80 commit bbc487e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Crypt/EstV3PosCrypt.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ public function create3DHash(AbstractPosAccount $account, array $requestData, ?s
{
ksort($requestData, SORT_NATURAL | SORT_FLAG_CASE);
foreach (array_keys($requestData) as $key) {
// this part is needed only to create hash from the bank response
if (in_array(strtolower($key), ['hash', 'encoding'])) {
/**
* this part is needed only to create hash from the bank response
*
* nationalidno:Ziraat ödeme dönüşlerinde checkHash arrayi içerisinde yer alabiliyor. Hash string içine dahil edildiğinde hataya sebep oluyor,
* Payten tarafından hash içerisinde olmaması gerektiği teyidi alındı.
*/
if (in_array(strtolower($key), ['hash', 'encoding' , 'nationalidno'])) {
unset($requestData[$key]);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ public static function threeDPayPaymentDataProvider(): array
'rnd' => 'kP/2JB5ajHJt+yVhHNG9',
'HASHPARAMS' => 'clientid:oid:AuthCode:ProcReturnCode:Response:mdStatus:cavv:eci:md:rnd:',
'HASHPARAMSVAL' => '7006550002002022103030CBP3789100Approved1ABABByBkEgAAAABllJMDdVWUGZE=05435508:EC9CDC37975501A4B29BBD5BE1580279238BF88D888B23E7ECC293581C75EE40:4333:##700655000200kP/2JB5ajHJt+yVhHNG9',
'NATIONALIDNO' => '',
],
'expectedData' => [
'transaction_security' => 'Full 3D Secure',
Expand Down

0 comments on commit bbc487e

Please sign in to comment.