From e9ab69cbdfecc195d426b8cda2efbcfd0b3fd431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fikret=20=C3=87=C4=B0N?= Date: Fri, 8 Dec 2023 15:35:51 +0300 Subject: [PATCH] tests ok --- src/DataMapper/EstPosRequestDataMapper.php | 1 + tests/DataMapper/EstPosRequestDataMapperTest.php | 4 ++++ tests/DataMapper/EstV3PosRequestDataMapperTest.php | 9 +++++---- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/DataMapper/EstPosRequestDataMapper.php b/src/DataMapper/EstPosRequestDataMapper.php index a8352f80..7ecef742 100644 --- a/src/DataMapper/EstPosRequestDataMapper.php +++ b/src/DataMapper/EstPosRequestDataMapper.php @@ -261,6 +261,7 @@ public function create3DFormData(AbstractPosAccount $account, $order, string $tx */ public function create3DFormDataCommon(AbstractPosAccount $account, $order, string $txType, string $gatewayURL, ?AbstractCreditCard $card = null): array { + $inputs = [ 'clientid' => $account->getClientId(), 'storetype' => $this->secureTypeMappings[$account->getModel()], diff --git a/tests/DataMapper/EstPosRequestDataMapperTest.php b/tests/DataMapper/EstPosRequestDataMapperTest.php index 06c4da8a..ba33ab96 100644 --- a/tests/DataMapper/EstPosRequestDataMapperTest.php +++ b/tests/DataMapper/EstPosRequestDataMapperTest.php @@ -322,6 +322,7 @@ public function testGet3DFormData() 'okUrl' => $this->order['success_url'], 'failUrl' => $this->order['fail_url'], 'callbackUrl' => $this->order['fail_url'], + 'refreshtime' => '10', 'rnd' => $this->order['rand'], 'lang' => 'tr', 'currency' => 949, @@ -407,6 +408,7 @@ public function testGet3DHostFormData() 'okUrl' => $this->order['success_url'], 'failUrl' => $this->order['fail_url'], 'callbackUrl' => $this->order['fail_url'], + 'refreshtime' => '10', 'rnd' => $this->order['rand'], 'lang' => 'tr', 'currency' => '949', @@ -525,6 +527,7 @@ public static function threeDFormDataProvider(): iterable 'okUrl' => 'https://domain.com/success', 'failUrl' => 'https://domain.com/fail_url', 'callbackUrl' => 'https://domain.com/fail_url', + 'refreshtime' => '10', 'rnd' => 'rand', 'lang' => 'tr', 'currency' => '949', @@ -567,6 +570,7 @@ public static function threeDFormDataProvider(): iterable 'okUrl' => 'https://domain.com/success', 'failUrl' => 'https://domain.com/fail_url', 'callbackUrl' => 'https://domain.com/fail_url', + 'refreshtime' => '10', 'rnd' => 'rand', 'lang' => 'tr', 'currency' => '949', diff --git a/tests/DataMapper/EstV3PosRequestDataMapperTest.php b/tests/DataMapper/EstV3PosRequestDataMapperTest.php index 4bdea209..e2784622 100644 --- a/tests/DataMapper/EstV3PosRequestDataMapperTest.php +++ b/tests/DataMapper/EstV3PosRequestDataMapperTest.php @@ -95,13 +95,14 @@ public function testGet3DFormData() 'callbackUrl' => $this->order['fail_url'], 'rnd' => $this->order['rand'], 'hashAlgorithm' => 'ver3', + 'refreshtime' => '10', 'lang' => 'tr', - 'currency' => 949, + 'currency' => '949', 'TranType' => 'Auth', 'taksit' => '', ]; - $hash = '7MGmDH2CY9jlFd4kVHwdvlyt07hIqkiBWVR8bkjAiaaRhK2XUHyvrDLqv0vlG6YY8bXChDkLfnDwVLi3Pvg5lQ=='; + $hash = '06DYVTzCUae0u99v6uO08kih+3ADmTkqbGYakt30kNQj+5Hrt26701fXWMS+TFrqtsU1ongDfukk9fjTq5mZTQ=='; $inputs['hash'] = $hash; $form = [ 'gateway' => $gatewayURL, @@ -124,7 +125,7 @@ public function testGet3DFormData() $form['inputs']['cv2'] = $card->getCvv(); unset($form['inputs']['hash']); - $form['inputs']['hash'] = '7EgK2aMhS848ZMEkl2d0s1dFXlMhCy4LS5FFk+k/FbEmmVqBqx6TtQ1Yg7aW0KQa/5hrQODwBVT3SCUwfXHEsg=='; + $form['inputs']['hash'] = 'jXlIRQn+vHyvQ9Byxk0v2pGGwnoBc1bPEJaYkcDNOq9JOn7MJr0+l5olODtjYy2KsHMZwjKWLpQevXVIHLtYyw=='; $this->assertEquals($form, $this->requestDataMapper->create3DFormData( $this->pos->getAccount(), @@ -179,7 +180,7 @@ public function testGet3DHostFormData() 'inputs' => $inputs, ]; - $form['inputs']['hash'] = 'pxvr9oG9G6v2AU/Lci3qs7OiBAwcvAaLotG5rorJVe31DJN/wlVDReWpqFSJojTLPs6pPiS1L1U+QkE0dJJBKw=='; + $form['inputs']['hash'] = 'vAxgy0o5YS3CdmqblwAOCuZTpNQ6p6XdhPn3WZqT3LfZoCf2un/Vhr+NlGV5yZiJZYZgZ8l20UAUfH+dhakKAA=='; $this->assertEquals($form, $this->requestDataMapper->create3DFormData( $pos->getAccount(),