Skip to content

Commit

Permalink
BP-2990 In3 (V3) set the iDEAL In3 logo as the default (#830)
Browse files Browse the repository at this point in the history
Co-authored-by: Ivascu Madalin <[email protected]>
  • Loading branch information
harli91 and Ivascu Madalin authored Oct 19, 2023
1 parent 11547d9 commit 2d3e85f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
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;
}
}

0 comments on commit 2d3e85f

Please sign in to comment.