diff --git a/src/DataMapper/EstPosRequestDataMapper.php b/src/DataMapper/EstPosRequestDataMapper.php index 130809d6..a492f52b 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()], @@ -270,6 +271,7 @@ public function create3DFormDataCommon(AbstractPosAccount $account, $order, stri 'failUrl' => $order->fail_url, // musteri 3D onay sayfasinda islemleri tamamlamadan kapatirsa, banka bu sayfaya bir istek gonderecek. 'callbackUrl' => $order->fail_url, + 'refreshTime' => '10', //callbackUrl sisteminin doğru çalışması için eklenmesi gereken parametre 'rnd' => $order->rand, 'lang' => $this->getLang($account, $order), 'currency' => $this->mapCurrency($order->currency), diff --git a/tests/DataMapper/EstPosRequestDataMapperTest.php b/tests/DataMapper/EstPosRequestDataMapperTest.php index 06c4da8a..b1771a9e 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 22168d8f..313bd006 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(), @@ -167,6 +168,7 @@ public function testGet3DHostFormData() 'callbackUrl' => $this->order['fail_url'], 'rnd' => $this->order['rand'], 'hashAlgorithm' => 'ver3', + 'refreshTime' => '10', 'lang' => 'tr', 'currency' => '949', 'TranType' => 'Auth', @@ -178,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(), diff --git a/tests/DataMapper/ResponseDataMapper/EstPosResponseDataMapperTest.php b/tests/DataMapper/ResponseDataMapper/EstPosResponseDataMapperTest.php index 98bcfc57..b5e3fb1a 100644 --- a/tests/DataMapper/ResponseDataMapper/EstPosResponseDataMapperTest.php +++ b/tests/DataMapper/ResponseDataMapper/EstPosResponseDataMapperTest.php @@ -737,7 +737,7 @@ public static function threeDHostPaymentDataProvider(): array 'firmaadi' => 'John Doe', 'islemtipi' => 'Auth', 'campaignOptions' => '000001', - 'refreshtime' => '300', + 'refreshTime' => '300', 'lang' => 'tr', 'merchantID' => '700655000200', 'maskedCreditCard' => '4355 08** **** 4358', @@ -823,7 +823,7 @@ public static function threeDHostPaymentDataProvider(): array 'firmaadi' => 'John Doe', 'islemtipi' => 'Auth', 'campaignOptions' => '000002', - 'refreshtime' => '300', + 'refreshTime' => '300', 'lang' => 'tr', 'merchantID' => '700655000200', 'maskedCreditCard' => '4355 08** **** 4358',