Skip to content

Commit

Permalink
Merge pull request #1087 from buckaroo-it/develop
Browse files Browse the repository at this point in the history
get hotfix changes
  • Loading branch information
vegimcarkaxhija authored Nov 6, 2024
2 parents e575862 + 1824205 commit d4cd409
Show file tree
Hide file tree
Showing 30 changed files with 28 additions and 1,012 deletions.
1 change: 0 additions & 1 deletion Block/Widget/Button/Toolbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class Toolbar
'buckaroo_magento2_belfius',
'buckaroo_magento2_transfer',
'buckaroo_magento2_eps',
'buckaroo_magento2_giropay',
'buckaroo_magento2_kbc',
'buckaroo_magento2_klarna',
'buckaroo_magento2_klarnakp',
Expand Down
1 change: 0 additions & 1 deletion Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ public function getPaymentMethodsList()
['value' => 'emandate', 'label' => __('Digital Debit Authorization')],
['value' => 'eps', 'label' => __('EPS')],
['value' => 'giftcards', 'label' => __('Giftcards')],
['value' => 'giropay', 'label' => __('Giropay')],
['value' => 'ideal', 'label' => __('iDEAL')],
['value' => 'idealprocessing', 'label' => __('iDEAL Processing')],
['value' => 'kbc', 'label' => __('KBC')],
Expand Down
1 change: 0 additions & 1 deletion Model/Config/Source/PaymentMethods/AfterExpiry.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public function toOptionArray()
['value' => 'dankort', 'label' => __('Dankort')],
['value' => 'eps', 'label' => __('EPS')],
['value' => 'giftcard', 'label' => __('Giftcards')],
['value' => 'giropay', 'label' => __('Giropay')],
['value' => 'ideal', 'label' => __('iDEAL')],
['value' => 'idealprocessing', 'label' => __('iDEAL Processing')],
['value' => 'maestro', 'label' => __('Maestro')],
Expand Down
1 change: 0 additions & 1 deletion Model/Config/Source/PaymentMethods/PayLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public function toOptionArray()
['value' => 'dankort', 'label' => __('Dankort')],
['value' => 'eps', 'label' => __('EPS')],
['value' => 'giftcard', 'label' => __('Giftcards')],
['value' => 'giropay', 'label' => __('Giropay')],
['value' => 'ideal', 'label' => __('iDEAL')],
['value' => 'idealprocessing', 'label' => __('iDEAL Processing')],
['value' => 'maestro', 'label' => __('Maestro')],
Expand Down
5 changes: 0 additions & 5 deletions Model/Config/Source/PaymentMethods/PayPerEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ public function toOptionArray()
'label' => __('Giftcards'),
'code' => 'buckaroo_magento2_giftcards'
],
[
'value' => 'giropay',
'label' => __('Giropay'),
'code' => 'buckaroo_magento2_giropay'
],
[
'value' => 'ideal',
'label' => __('iDEAL'),
Expand Down
81 changes: 0 additions & 81 deletions Model/ConfigProvider/Method/Giropay.php

This file was deleted.

3 changes: 2 additions & 1 deletion Model/ConfigProvider/Method/P24.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ public function getPaymentFee($storeId = null)
public function getBaseAllowedCurrencies()
{
return [
'PLN'
'PLN',
'EUR'
];
}
}
109 changes: 0 additions & 109 deletions Model/Method/Giropay.php

This file was deleted.

30 changes: 16 additions & 14 deletions Model/Service/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use Magento\Sales\Model\ResourceModel\Order\CollectionFactory;
use Buckaroo\Magento2\Helper\Data;
use Magento\Framework\App\ResourceConnection;
use Laminas\Db\Sql\Expression;

class Order
{
Expand All @@ -43,16 +44,17 @@ class Order
private Factory $configProviderFactory;

public function __construct(
Account $accountConfig,
MethodFactory $configProviderMethodFactory,
Factory $configProviderFactory,
Account $accountConfig,
MethodFactory $configProviderMethodFactory,
Factory $configProviderFactory,
StoreRepositoryInterface $storeRepository,
CollectionFactory $orderFactory,
OrderStatusFactory $orderStatusFactory,
Data $helper,
Log $logging,
ResourceConnection $resourceConnection
) {
CollectionFactory $orderFactory,
OrderStatusFactory $orderStatusFactory,
Data $helper,
Log $logging,
ResourceConnection $resourceConnection
)
{
$this->accountConfig = $accountConfig;
$this->configProviderMethodFactory = $configProviderMethodFactory;
$this->configProviderFactory = $configProviderFactory;
Expand Down Expand Up @@ -94,11 +96,11 @@ protected function cancelExpiredTransferOrdersPerStore($store)
)
->addFieldToFilter(
'created_at',
['lt' => new \Zend_Db_Expr('NOW() - INTERVAL ' . $dueDays . ' DAY')]
['lt' => new Expression('NOW() - INTERVAL ' . $dueDays . ' DAY')]
)
->addFieldToFilter(
'created_at',
['gt' => new \Zend_Db_Expr('NOW() - INTERVAL ' . ($dueDays + 7) . ' DAY')]
['gt' => new Expression('NOW() - INTERVAL ' . ($dueDays + 7) . ' DAY')]
);

$orderCollection->getSelect()
Expand Down Expand Up @@ -154,11 +156,11 @@ protected function cancelExpiredPPEOrdersPerStore($store)
)
->addFieldToFilter(
'created_at',
['lt' => new \Zend_Db_Expr('NOW() - INTERVAL ' . $dueDays . ' DAY')]
['lt' => new Expression('NOW() - INTERVAL ' . $dueDays . ' DAY')]
)
->addFieldToFilter(
'created_at',
['gt' => new \Zend_Db_Expr('NOW() - INTERVAL ' . ($dueDays + 7) . ' DAY')]
['gt' => new Expression('NOW() - INTERVAL ' . ($dueDays + 7) . ' DAY')]
);

$orderCollection->getSelect()
Expand Down Expand Up @@ -216,7 +218,7 @@ public function cancel($order, $statusCode)
$this->logging->addDebug(__METHOD__ . '|20|');

if (in_array($order->getPayment()->getMethodInstance()->buckarooPaymentMethodCode, ['klarnakp'])) {
$methodInstanceClass = get_class($order->getPayment()->getMethodInstance());
$methodInstanceClass = get_class($order->getPayment()->getMethodInstance());
$methodInstanceClass::$requestOnVoid = false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ public function toOptionArrayProvider()
[
['value' => 'giftcard', 'label' => 'Giftcards']
],
[
['value' => 'giropay', 'label' => 'Giropay']
],
[
['value' => 'ideal', 'label' => 'iDEAL']
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ public function toOptionArrayProvider()
[
['value' => 'giftcard', 'label' => 'Giftcards']
],
[
['value' => 'giropay', 'label' => 'Giropay']
],
[
['value' => 'ideal', 'label' => 'iDEAL']
],
Expand Down
Loading

0 comments on commit d4cd409

Please sign in to comment.