From 347bbeb48a8b117c4f3c39b44810c0ce31d806ae Mon Sep 17 00:00:00 2001 From: Fabiano Mallmann <25328512+fabiano-mallmann@users.noreply.github.com> Date: Mon, 22 Jan 2024 10:34:51 -0300 Subject: [PATCH 1/2] fix: resolve merge conflit and change url to tds --- Block/Adminhtml/Form/Fieldset/CreditCardGatewayFieldset.php | 6 +++--- Block/Payment/Tds.php | 4 ++-- etc/csp_whitelist.xml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Block/Adminhtml/Form/Fieldset/CreditCardGatewayFieldset.php b/Block/Adminhtml/Form/Fieldset/CreditCardGatewayFieldset.php index fb6a3076..a5d7d936 100644 --- a/Block/Adminhtml/Form/Fieldset/CreditCardGatewayFieldset.php +++ b/Block/Adminhtml/Form/Fieldset/CreditCardGatewayFieldset.php @@ -41,9 +41,9 @@ public function __construct( */ public function render(AbstractElement $element) { - // if (!$this->account->isGateway(PagarmeConfigProvider::CREDIT_CARD_PAYMENT_CONFIG)) { - // return ''; - // } + if ($this->account->isGateway(PagarmeConfigProvider::CREDIT_CARD_PAYMENT_CONFIG)) { + return ''; + } return parent::render($element); } diff --git a/Block/Payment/Tds.php b/Block/Payment/Tds.php index eee8d904..3aed99ee 100644 --- a/Block/Payment/Tds.php +++ b/Block/Payment/Tds.php @@ -54,9 +54,9 @@ public function __construct( public function getSdkUrl() { - $url = 'https://auth-3ds.pagar.me/bundle.js'; + $url = 'https://3ds2.pagar.me/v1/3ds2.min.js'; if ($this->pagarmeConfig->isSandboxMode()) { - $url = 'https://auth-3ds-sdx.pagar.me/bundle.js'; + $url = 'https://3ds2-sdx.pagar.me/v1/3ds2.min.js'; } return $url; } diff --git a/etc/csp_whitelist.xml b/etc/csp_whitelist.xml index 87b901f4..756ba7ac 100644 --- a/etc/csp_whitelist.xml +++ b/etc/csp_whitelist.xml @@ -17,7 +17,7 @@ - auth-3ds-sdx.pagar.me + 3ds2-sdx.pagar.me From 0b5d5e25c2e62976eeddf42f1bd9b5ff1cb9cc1f Mon Sep 17 00:00:00 2001 From: Fabiano Mallmann <25328512+fabiano-mallmann@users.noreply.github.com> Date: Mon, 22 Jan 2024 10:36:51 -0300 Subject: [PATCH 2/2] fix: resolve merge conflit and change url to tds --- .../Transaction/Base/Command/InitializeCommand.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Gateway/Transaction/Base/Command/InitializeCommand.php b/Gateway/Transaction/Base/Command/InitializeCommand.php index b4d11770..4b540498 100755 --- a/Gateway/Transaction/Base/Command/InitializeCommand.php +++ b/Gateway/Transaction/Base/Command/InitializeCommand.php @@ -36,19 +36,16 @@ class InitializeCommand implements CommandInterface { protected $config; - - public function __construct( - Config $config - ){ - $this->config = $config; - } /** * @var ThreeDSService */ protected $threeDSService; - public function __construct(ThreeDSService $threeDSService) - { + public function __construct( + Config $config, + ThreeDSService $threeDSService + ){ + $this->config = $config; $this->threeDSService = $threeDSService; }