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

BP-2990 In3 (V3) set the iDEAL In3 logo as the default #830

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
4 changes: 2 additions & 2 deletions Block/Config/Form/Field/LogoSelector.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ protected function _getElementHtml(AbstractElement $element)
public function getLogos(): array
{
return [
"in3.svg" => $this->assetRepo->getUrl("Buckaroo_Magento2::images/svg/in3.svg"),
"in3-ideal.svg" => $this->assetRepo->getUrl("Buckaroo_Magento2::images/svg/in3-ideal.svg")
"in3-ideal.svg" => $this->assetRepo->getUrl("Buckaroo_Magento2::images/svg/in3-ideal.svg"),
"in3.svg" => $this->assetRepo->getUrl("Buckaroo_Magento2::images/svg/in3.svg")
];
}
}
10 changes: 7 additions & 3 deletions Model/ConfigProvider/Method/CapayableIn3.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ public function getPaymentFee($storeId = null)
return $paymentFee ? $paymentFee : false;
}

public function isV3($storeId = null): bool
public function isV2($storeId = null): bool
{
return $this->scopeConfig->getValue(
self::XPATH_CAPAYABLEIN3_API_VERSION,
ScopeInterface::SCOPE_STORE,
$storeId
) !== 'V2';
) === 'V2';
}
public function getLogo($storeId = null): string
{
Expand All @@ -119,10 +119,14 @@ public function getLogo($storeId = null): string
$storeId
);

if (!is_string($logo) || !$this->isV3($storeId)) {
if ($this->isV2($storeId)) {
return 'in3.svg';
}

if (!is_string($logo)) {
return 'in3-ideal.svg';
}

return $logo;
}
}
Loading