Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve merge conflit and change url to tds #302

Merged
merged 2 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Block/Adminhtml/Form/Fieldset/CreditCardGatewayFieldset.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions Block/Payment/Tds.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
13 changes: 5 additions & 8 deletions Gateway/Transaction/Base/Command/InitializeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion etc/csp_whitelist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</policy>
<policy id="script-src">
<values>
<value id="pagarme-api-3ds" type="host">auth-3ds-sdx.pagar.me</value>
<value id="pagarme-api-3ds" type="host">3ds2-sdx.pagar.me</value>
</values>
</policy>
<policy id="frame-src">
Expand Down
Loading