From b2dcf802bde944490a79de78399727e0a24f228b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fikret=20=C3=87in?= Date: Tue, 12 Dec 2023 13:45:47 +0300 Subject: [PATCH] =?UTF-8?q?nationalidno=20check=20hash=20i=C3=A7erisinden?= =?UTF-8?q?=20temizlendi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Crypt/EstV3PosCrypt.php | 9 +++++++-- .../ResponseDataMapper/EstPosResponseDataMapperTest.php | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Crypt/EstV3PosCrypt.php b/src/Crypt/EstV3PosCrypt.php index c87bb3a0..e85656b0 100644 --- a/src/Crypt/EstV3PosCrypt.php +++ b/src/Crypt/EstV3PosCrypt.php @@ -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]); } } diff --git a/tests/DataMapper/ResponseDataMapper/EstPosResponseDataMapperTest.php b/tests/DataMapper/ResponseDataMapper/EstPosResponseDataMapperTest.php index 5650ef21..98bcfc57 100644 --- a/tests/DataMapper/ResponseDataMapper/EstPosResponseDataMapperTest.php +++ b/tests/DataMapper/ResponseDataMapper/EstPosResponseDataMapperTest.php @@ -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',