Skip to content
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
7 changes: 4 additions & 3 deletions Block/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Info extends \Magento\Payment\Block\Info
/**
* @param \Magento\Framework\View\Element\Template\Context $context
* @param array $data
* @param \Buckaroo\Magento2\Model\ConfigProvider\Method\Creditcards $configProvider
* @param \Buckaroo\Magento2\Model\ConfigProvider\Method\Creditcard $configProvider
*/
public function __construct(
\Magento\Framework\View\Element\Template\Context $context,
Expand Down Expand Up @@ -98,6 +98,7 @@ public function getPaymentLogo(string $method): string
"afterpay20" => "svg/riverty.svg",
"capayablein3" => "svg/in3.svg",
"capayablepostpay" => "svg/in3.svg",
"creditcard" => "svg/creditcards.svg",
"creditcards" => "svg/creditcards.svg",
"giftcards" => "svg/giftcards.svg",
"idealprocessing" => "svg/ideal.svg",
Expand All @@ -113,7 +114,7 @@ public function getPaymentLogo(string $method): string
];

$name = "svg/{$method}.svg";

if(isset($mappings[$method])) {
$name = $mappings[$method];
}
Expand Down Expand Up @@ -162,7 +163,7 @@ public function getCreditcardLogo(string $code): string
if($code === 'cartebleuevisa') {
$code = 'cartebleue';
}

return $this->assetRepo->getUrl("Buckaroo_Magento2::images/creditcards/{$code}.svg");
}
}
6 changes: 3 additions & 3 deletions Block/Info/Creditcard.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ class Creditcard extends \Buckaroo\Magento2\Block\Info
protected $mpiStatus;

/**
* @var \Buckaroo\Magento2\Model\ConfigProvider\Method\Creditcards
* @var \Buckaroo\Magento2\Model\ConfigProvider\Method\Creditcard
*/
protected $configProvider;

/**
* @var string
*/
protected $_template = 'Buckaroo_Magento2::info/creditcards.phtml';
protected $_template = 'Buckaroo_Magento2::info/creditcard.phtml';

public function __construct(
\Magento\Framework\View\Element\Template\Context $context,
Expand All @@ -54,7 +54,7 @@ public function __construct(
Repository $assetRepo,
UrlInterface $baseUrl,
array $data = [],
\Buckaroo\Magento2\Model\ConfigProvider\Method\Creditcards $configProvider = null
\Buckaroo\Magento2\Model\ConfigProvider\Method\Creditcard $configProvider = null
) {
parent::__construct($context, $groupTransaction, $giftcardCollection, $assetRepo, $baseUrl, $data);
$this->configProvider = $configProvider;
Expand Down
1 change: 1 addition & 0 deletions Block/Widget/Button/Toolbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Toolbar
'buckaroo_magento2_billink',
'buckaroo_magento2_payperemail',
'buckaroo_magento2_paylink',
'buckaroo_magento2_creditcard',
'buckaroo_magento2_creditcards',
'buckaroo_magento2_ideal',
'buckaroo_magento2_idealprocessing',
Expand Down
164 changes: 0 additions & 164 deletions Controller/CredentialsChecker/GetToken.php

This file was deleted.

14 changes: 13 additions & 1 deletion Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,17 @@ public function getStore()
}
}

public function getConfigCardSort()
{
$configValue = $this->scopeConfig->getValue(
'payment/buckaroo_magento2_creditcard/sorted_issuers',
$this->scopeDefiner->getScope(),
($this->scopeDefiner->getScope() == ScopeInterface::SCOPE_WEBSITES) ? $this->storeManager->getStore() : null
);

return $configValue;
}

public function getConfigGiftCardsSort()
{
$configValue = $this->scopeConfig->getValue(
Expand Down Expand Up @@ -422,7 +433,8 @@ public function getPaymentMethodsList()
['value' => 'applepay', 'label' => __('Apple Pay')],
['value' => 'billink', 'label' => __('Billink')],
['value' => 'capayablein3', 'label' => __('In3')],
['value' => 'creditcards', 'label' => __('Credit and debit cards')],
['value' => 'creditcard', 'label' => __('Credit and debit cards')],
['value' => 'creditcards', 'label' => __('Credit and debit cards (Client sided)')],
['value' => 'emandate', 'label' => __('Digital Debit Authorization')],
['value' => 'eps', 'label' => __('EPS')],
['value' => 'giftcards', 'label' => __('Giftcards')],
Expand Down
6 changes: 3 additions & 3 deletions Model/Config/Source/Creditcard.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
class Creditcard implements \Magento\Framework\Option\ArrayInterface
{
/**
* @var \Buckaroo\Magento2\Model\ConfigProvider\Method\Creditcards
* @var \Buckaroo\Magento2\Model\ConfigProvider\Method\Creditcard
*/
protected $configProvider;

/**
* Use the constructor to get the requested config provider.
*
* @param \Buckaroo\Magento2\Model\ConfigProvider\Method\Creditcards $configProvider
* @param \Buckaroo\Magento2\Model\ConfigProvider\Method\Creditcard $configProvider
*/
public function __construct(
\Buckaroo\Magento2\Model\ConfigProvider\Method\Creditcards $configProvider
\Buckaroo\Magento2\Model\ConfigProvider\Method\Creditcard $configProvider
) {
$this->configProvider = $configProvider;
}
Expand Down
2 changes: 1 addition & 1 deletion Model/ConfigProvider/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public function getParsedLabel(Store $store, OrderInterface $order)
if ($label === null) {
return $store->getName();
}

$label = preg_replace('/\{order_number\}/', $order->getIncrementId(), $label);
$label = preg_replace('/\{shop_name\}/', $store->getName(), $label);

Expand Down
Loading
Loading