diff --git a/.github/workflows/end-2-end-test.yml b/.github/workflows/end-2-end-test.yml
index 47c67b07bbe..66af1977d26 100644
--- a/.github/workflows/end-2-end-test.yml
+++ b/.github/workflows/end-2-end-test.yml
@@ -47,9 +47,9 @@ jobs:
matrix:
include:
- PHP_VERSION: php74-fpm
- MAGENTO_VERSION: 2.3.7-p3
- - PHP_VERSION: php81-fpm
- MAGENTO_VERSION: 2.4.6
+ MAGENTO_VERSION: 2.3.7-p4
+ - PHP_VERSION: php82-fpm
+ MAGENTO_VERSION: 2.4.6-p4
runs-on: ubuntu-latest
env:
PHP_VERSION: ${{ matrix.PHP_VERSION }}
diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml
index 8d146e1245d..706780f5952 100644
--- a/.github/workflows/integration-test.yml
+++ b/.github/workflows/integration-test.yml
@@ -7,15 +7,15 @@ jobs:
matrix:
include:
- PHP_VERSION: php73-fpm
- MAGENTO_VERSION: 2.3.7-p3
+ MAGENTO_VERSION: 2.3.7-p4
- PHP_VERSION: php74-fpm
MAGENTO_VERSION: 2.4.0
- PHP_VERSION: php74-fpm
MAGENTO_VERSION: 2.4.3-with-replacements
- PHP_VERSION: php81-fpm
- MAGENTO_VERSION: 2.4.6
+ MAGENTO_VERSION: 2.4.6-p4
- PHP_VERSION: php82-fpm
- MAGENTO_VERSION: 2.4.6
+ MAGENTO_VERSION: 2.4.6-p4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml
index 359a90b1204..b6bd1a8377b 100644
--- a/.github/workflows/phpstan.yml
+++ b/.github/workflows/phpstan.yml
@@ -7,13 +7,13 @@ jobs:
matrix:
include:
- PHP_VERSION: php73-fpm
- MAGENTO_VERSION: 2.3.7-p3
+ MAGENTO_VERSION: 2.3.7-p4
- PHP_VERSION: php74-fpm
MAGENTO_VERSION: 2.4.0
- PHP_VERSION: php81-fpm
- MAGENTO_VERSION: 2.4.6
+ MAGENTO_VERSION: 2.4.6-p4
- PHP_VERSION: php82-fpm
- MAGENTO_VERSION: 2.4.6
+ MAGENTO_VERSION: 2.4.6-p4
runs-on: ubuntu-latest
steps:
diff --git a/.github/workflows/setup-di-compile.yml b/.github/workflows/setup-di-compile.yml
index 783ca7d27fa..2b0f6577523 100644
--- a/.github/workflows/setup-di-compile.yml
+++ b/.github/workflows/setup-di-compile.yml
@@ -7,15 +7,15 @@ jobs:
matrix:
include:
- PHP_VERSION: php73-fpm
- MAGENTO_VERSION: 2.3.7-p3
+ MAGENTO_VERSION: 2.3.7-p4
- PHP_VERSION: php74-fpm
MAGENTO_VERSION: 2.4.0
- PHP_VERSION: php74-fpm
MAGENTO_VERSION: 2.4.3-with-replacements
- PHP_VERSION: php81-fpm
- MAGENTO_VERSION: 2.4.6
+ MAGENTO_VERSION: 2.4.6-p4
- PHP_VERSION: php82-fpm
- MAGENTO_VERSION: 2.4.6
+ MAGENTO_VERSION: 2.4.6-p4
runs-on: ubuntu-latest
steps:
diff --git a/.github/workflows/templates/magento/configure-mollie.sh b/.github/workflows/templates/magento/configure-mollie.sh
index 291a70f260d..074ee7979cf 100644
--- a/.github/workflows/templates/magento/configure-mollie.sh
+++ b/.github/workflows/templates/magento/configure-mollie.sh
@@ -12,6 +12,8 @@ bin/magento config:set payment/mollie_general/type test &
# Enable all payment methods
bin/magento config:set payment/mollie_methods_applepay/active 1 &
bin/magento config:set payment/mollie_methods_banktransfer/active 1 &
+bin/magento config:set payment/mollie_methods_billie/active 1 &
+bin/magento config:set payment/mollie_methods_blik/active 1 &
bin/magento config:set payment/mollie_methods_creditcard/active 1 &
bin/magento config:set payment/mollie_methods_giftcard/active 1 &
bin/magento config:set payment/mollie_methods_ideal/active 1 &
@@ -24,7 +26,6 @@ bin/magento config:set payment/mollie_methods_belfius/active 1 &
bin/magento config:set payment/mollie_methods_eps/active 1 &
bin/magento config:set payment/mollie_methods_giropay/active 1 &
bin/magento config:set payment/mollie_methods_klarnapaylater/active 1 &
-bin/magento config:set payment/mollie_methods_billie/active 1 &
bin/magento config:set payment/mollie_methods_paymentlink/active 1 &
bin/magento config:set payment/mollie_methods_paysafecard/active 1 &
bin/magento config:set payment/mollie_methods_pointofsale/active 1 &
@@ -40,10 +41,16 @@ bin/magento config:set payment/mollie_methods_ideal/add_qr 1 &
bin/magento config:set payment/mollie_general/use_webhooks disabled &
# Configure currency for the swiss store view
-bin/magento config:set currency/options/allow EUR,CHF &
+bin/magento config:set currency/options/allow EUR,CHF,PLN &
+
+# Swiss scope
bin/magento config:set currency/options/default CHF --scope=ch &
bin/magento config:set payment/mollie_general/currency 0 --scope=ch &
+# Polish scope
+bin/magento config:set currency/options/default PLN --scope=pl &
+bin/magento config:set payment/mollie_general/currency 0 --scope=pl &
+
wait
if grep -q Magento_TwoFactorAuth "app/etc/config.php"; then
diff --git a/.github/workflows/templates/magento/merge-config.php.stub b/.github/workflows/templates/magento/merge-config.php.stub
index 74652e2bef3..58bf35ddfbc 100644
--- a/.github/workflows/templates/magento/merge-config.php.stub
+++ b/.github/workflows/templates/magento/merge-config.php.stub
@@ -69,7 +69,16 @@ $magentoConfig['scopes'] = [
'website_id' => '1',
'group_id' => '1',
'name' => 'Swiss',
- 'sort_order' => '0',
+ 'sort_order' => '1',
+ 'is_active' => '1'
+ ],
+ 'pl' => [
+ 'store_id' => '3',
+ 'code' => 'pl',
+ 'website_id' => '1',
+ 'group_id' => '1',
+ 'name' => 'Poland',
+ 'sort_order' => '2',
'is_active' => '1'
]
]
diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml
index 589685e4c41..c161b6f551c 100644
--- a/.github/workflows/unit-test.yml
+++ b/.github/workflows/unit-test.yml
@@ -7,15 +7,15 @@ jobs:
matrix:
include:
- PHP_VERSION: php73-fpm
- MAGENTO_VERSION: 2.3.7-p3
+ MAGENTO_VERSION: 2.3.7-p4
- PHP_VERSION: php74-fpm
MAGENTO_VERSION: 2.4.0
- PHP_VERSION: php74-fpm
MAGENTO_VERSION: 2.4.3-with-replacements
- PHP_VERSION: php81-fpm
- MAGENTO_VERSION: 2.4.6
+ MAGENTO_VERSION: 2.4.6-p4
- PHP_VERSION: php82-fpm
- MAGENTO_VERSION: 2.4.6
+ MAGENTO_VERSION: 2.4.6-p4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
diff --git a/Api/Data/PaymentLinkRedirectResultInterface.php b/Api/Data/PaymentLinkRedirectResultInterface.php
index 560aab710d5..bd302e1c955 100644
--- a/Api/Data/PaymentLinkRedirectResultInterface.php
+++ b/Api/Data/PaymentLinkRedirectResultInterface.php
@@ -17,4 +17,9 @@ public function isAlreadyPaid(): bool;
* @return string|null
*/
public function getRedirectUrl(): ?string;
+
+ /**
+ * @return bool
+ */
+ public function isExpired(): bool;
}
diff --git a/Api/Data/TransactionToProcessInterface.php b/Api/Data/TransactionToProcessInterface.php
index c87703eb2de..2e41dcb5445 100644
--- a/Api/Data/TransactionToProcessInterface.php
+++ b/Api/Data/TransactionToProcessInterface.php
@@ -29,4 +29,15 @@ public function setOrderId(int $id): TransactionToProcessInterface;
* @return int|null
*/
public function getOrderId(): ?int;
+
+ /**
+ * @param string $type
+ * @return \Mollie\Payment\Api\Data\TransactionToProcessInterface
+ */
+ public function setType(string $type): TransactionToProcessInterface;
+
+ /**
+ * @return string|null
+ */
+ public function getType(): ?string;
}
diff --git a/Controller/Checkout/PaymentLink.php b/Controller/Checkout/PaymentLink.php
index 3f3aaee1928..e28184ccb6b 100644
--- a/Controller/Checkout/PaymentLink.php
+++ b/Controller/Checkout/PaymentLink.php
@@ -60,6 +60,12 @@ public function execute()
return $this->returnStatusCode(404);
}
+ if ($result->isExpired()) {
+ $this->messageManager->addErrorMessage(__('Your payment link has expired.'));
+
+ return $this->resultFactory->create(ResultFactory::TYPE_REDIRECT)->setUrl('/');
+ }
+
if ($result->isAlreadyPaid()) {
$this->messageManager->addSuccessMessage(__('Your order has already been paid.'));
diff --git a/Controller/Checkout/Process.php b/Controller/Checkout/Process.php
index ed3e0cc45f3..a7d09c11839 100644
--- a/Controller/Checkout/Process.php
+++ b/Controller/Checkout/Process.php
@@ -118,7 +118,7 @@ public function execute()
$result = null;
foreach ($orderIds as $orderId => $paymentToken) {
$order = $this->orderRepository->get($orderId);
- $result = $this->processTransaction->execute($orderId, $order->getMollieTransactionId());
+ $result = $this->processTransaction->execute($orderId, $order->getMollieTransactionId(), 'success');
}
} catch (\Exception $e) {
$this->mollieHelper->addTolog('error', $e->getMessage());
@@ -126,7 +126,7 @@ public function execute()
return $this->_redirect($this->redirectOnError->getUrl());
}
- if ($result !== null && in_array($result->getStatus(), ['paid', 'authorized'])) {
+ if ($result !== null && $result->shouldRedirectToSuccessPage()) {
try {
$this->successPageRedirect->execute($order, $orderIds);
return $this->getResponse();
diff --git a/GraphQL/Resolver/Checkout/PaymentLinkRedirect.php b/GraphQL/Resolver/Checkout/PaymentLinkRedirect.php
index 20444e711f6..6953a1f48a6 100644
--- a/GraphQL/Resolver/Checkout/PaymentLinkRedirect.php
+++ b/GraphQL/Resolver/Checkout/PaymentLinkRedirect.php
@@ -41,6 +41,7 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
return [
'already_paid' => $result->isAlreadyPaid(),
'redirect_url' => $result->getRedirectUrl(),
+ 'is_expired' => $result->isExpired(),
];
}
}
diff --git a/GraphQL/Resolver/Checkout/ProcessTransaction.php b/GraphQL/Resolver/Checkout/ProcessTransaction.php
index 7e53b34e233..5200c00ebb6 100644
--- a/GraphQL/Resolver/Checkout/ProcessTransaction.php
+++ b/GraphQL/Resolver/Checkout/ProcessTransaction.php
@@ -65,7 +65,7 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
$order = $this->orderRepository->get($tokenModel->getOrderId());
$result = $this->processTransaction->execute($tokenModel->getOrderId(), $order->getMollieTransactionId());
- $redirectToSuccessPage = in_array($result->getStatus(), ['pending', 'paid', 'authorized']);
+ $redirectToSuccessPage = $result->shouldRedirectToSuccessPage();
$cart = null;
if ($tokenModel->getCartId()) {
diff --git a/Helper/General.php b/Helper/General.php
index dbd9ded1967..8be96d965d7 100755
--- a/Helper/General.php
+++ b/Helper/General.php
@@ -624,6 +624,7 @@ public function getAllActiveMethods($storeId)
'mollie_methods_banktransfer',
'mollie_methods_belfius',
'mollie_methods_billie',
+ 'mollie_methods_blik',
'mollie_methods_creditcard',
'mollie_methods_directdebit',
'mollie_methods_eps',
diff --git a/Model/Adminhtml/Backend/ChangeApiMode.php b/Model/Adminhtml/Backend/ChangeApiMode.php
index 82fc07e740f..c49d24bc0e5 100644
--- a/Model/Adminhtml/Backend/ChangeApiMode.php
+++ b/Model/Adminhtml/Backend/ChangeApiMode.php
@@ -70,7 +70,7 @@ public function afterSave()
{
$apiKey = $this->getApiKey($this->getValue());
if ($apiKey) {
- $this->updateProfileId->execute($apiKey, $this->getScope(), $this->getScopeId());
+ $this->updateProfileId->execute($apiKey, $this->getScope(), (int)$this->getScopeId());
}
return parent::afterSave();
diff --git a/Model/Client/Orders.php b/Model/Client/Orders.php
index 82acaf41dcf..f22353a9ac2 100644
--- a/Model/Client/Orders.php
+++ b/Model/Client/Orders.php
@@ -225,8 +225,7 @@ public function startTransaction(OrderInterface $order, $mollieApi)
$transactionId = $order->getMollieTransactionId();
if (!empty($transactionId)) {
- $mollieOrder = $mollieApi->orders->get($transactionId);
- return $mollieOrder->getCheckoutUrl();
+ return $this->getCheckoutUrl($mollieApi, $order);
}
$paymentToken = $this->paymentTokenForOrder->execute($order);
@@ -900,4 +899,16 @@ private function getCaptureAmount(OrderInterface $order, InvoiceInterface $invoi
return $order->getBaseGrandTotal();
}
+
+ private function getCheckoutUrl(MollieApiClient $mollieApi, OrderInterface $order): string
+ {
+ $mollieOrder = $mollieApi->orders->get($order->getMollieTransactionId());
+ if ($checkoutUrl = $mollieOrder->getCheckoutUrl()) {
+ return $checkoutUrl;
+ }
+
+ // There is no checkout URL, the transaction is either canceled or expired. Create a new transaction.
+ $order->setMollieTransactionId(null);
+ return $this->startTransaction($order, $mollieApi);
+ }
}
diff --git a/Model/Client/Orders/Processors/SuccessfulPayment.php b/Model/Client/Orders/Processors/SuccessfulPayment.php
index 42ccec81835..6d9657af86c 100644
--- a/Model/Client/Orders/Processors/SuccessfulPayment.php
+++ b/Model/Client/Orders/Processors/SuccessfulPayment.php
@@ -179,7 +179,8 @@ private function handleWebhookCall(OrderInterface $order, MollieOrder $mollieOrd
}
if ($mollieOrder->isAuthorized() &&
- $this->mollieHelper->getInvoiceMoment($order->getStoreId()) == InvoiceMoment::ON_AUTHORIZE
+ $this->mollieHelper->getInvoiceMoment($order->getStoreId()) == InvoiceMoment::ON_AUTHORIZE &&
+ $order->getInvoiceCollection()->count() === 0
) {
$payment->setIsTransactionClosed(false);
$payment->registerAuthorizationNotification($order->getBaseGrandTotal(), true);
diff --git a/Model/Methods/Blik.php b/Model/Methods/Blik.php
new file mode 100644
index 00000000000..dfb87a1aff7
--- /dev/null
+++ b/Model/Methods/Blik.php
@@ -0,0 +1,24 @@
+transactionId = $id;
@@ -45,4 +50,16 @@ public function getOrderId(): ?int
{
return $this->orderId;
}
+
+ public function setType(string $type): TransactionToProcessInterface
+ {
+ $this->type = $type;
+
+ return $this;
+ }
+
+ public function getType(): ?string
+ {
+ return $this->type;
+ }
}
diff --git a/Queue/Handler/TransactionProcessor.php b/Queue/Handler/TransactionProcessor.php
index 91430a1fea0..9b86eac0e3d 100644
--- a/Queue/Handler/TransactionProcessor.php
+++ b/Queue/Handler/TransactionProcessor.php
@@ -44,7 +44,7 @@ public function execute(TransactionToProcessInterface $data): void
$order = $this->orderRepository->get($data->getOrderId());
$order->setMollieTransactionId($data->getTransactionId());
- $this->mollieModel->processTransactionForOrder($order, 'webhook');
+ $this->mollieModel->processTransactionForOrder($order, $data->getType());
} catch (\Throwable $throwable) {
$this->config->addToLog('error', [
'from' => 'TransactionProcessor consumer',
diff --git a/README.md b/README.md
index 58d9ebf1f59..0b39e3f986b 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,7 @@ Mollie requires no minimum costs, no fixed contracts, no hidden costs. At Mollie
- Bank transfer
- Belfius Pay Button
- Billie
+- Blik
- Credit card (VISA, MasterCard, Maestro and American Express)
- EPS
- Gift cards (Webshop Giftcard, Podium Cadeaukaart, VVV Cadeaukaart, YourGift etc.)
diff --git a/Service/Magento/PaymentLinkRedirect.php b/Service/Magento/PaymentLinkRedirect.php
index 2204733bcc1..e97242dc30f 100644
--- a/Service/Magento/PaymentLinkRedirect.php
+++ b/Service/Magento/PaymentLinkRedirect.php
@@ -14,6 +14,7 @@
use Magento\Sales\Api\OrderRepositoryInterface;
use Magento\Sales\Model\Order;
use Mollie\Payment\Model\Mollie;
+use Mollie\Payment\Service\Mollie\Order\IsPaymentLinkExpired;
class PaymentLinkRedirect
{
@@ -33,17 +34,23 @@ class PaymentLinkRedirect
* @var PaymentLinkRedirectResultFactory
*/
private $paymentLinkRedirectResultFactory;
+ /**
+ * @var IsPaymentLinkExpired
+ */
+ private $isPaymentLinkExpired;
public function __construct(
EncryptorInterface $encryptor,
OrderRepositoryInterface $orderRepository,
Mollie $mollie,
- PaymentLinkRedirectResultFactory $paymentLinkRedirectResultFactory
+ PaymentLinkRedirectResultFactory $paymentLinkRedirectResultFactory,
+ IsPaymentLinkExpired $isPaymentLinkExpired
) {
$this->encryptor = $encryptor;
$this->orderRepository = $orderRepository;
$this->mollie = $mollie;
$this->paymentLinkRedirectResultFactory = $paymentLinkRedirectResultFactory;
+ $this->isPaymentLinkExpired = $isPaymentLinkExpired;
}
public function execute(string $orderId): PaymentLinkRedirectResult
@@ -60,15 +67,25 @@ public function execute(string $orderId): PaymentLinkRedirectResult
throw new NotFoundException(__('Order not found'));
}
+ if ($this->isPaymentLinkExpired->execute($order)) {
+ return $this->paymentLinkRedirectResultFactory->create([
+ 'redirectUrl' => null,
+ 'isExpired' => true,
+ 'alreadyPaid' => false,
+ ]);
+ }
+
if (in_array($order->getState(), [Order::STATE_PROCESSING, Order::STATE_COMPLETE])) {
return $this->paymentLinkRedirectResultFactory->create([
'redirectUrl' => null,
+ 'isExpired' => false,
'alreadyPaid' => true,
]);
}
return $this->paymentLinkRedirectResultFactory->create([
'redirectUrl' => $this->mollie->startTransaction($order),
+ 'isExpired' => false,
'alreadyPaid' => false,
]);
}
diff --git a/Service/Magento/PaymentLinkRedirectResult.php b/Service/Magento/PaymentLinkRedirectResult.php
index d51d62f6595..66a14d43098 100644
--- a/Service/Magento/PaymentLinkRedirectResult.php
+++ b/Service/Magento/PaymentLinkRedirectResult.php
@@ -20,13 +20,19 @@ class PaymentLinkRedirectResult implements PaymentLinkRedirectResultInterface
* @var string|null
*/
private $redirectUrl;
+ /**
+ * @var bool
+ */
+ private $isExpired;
public function __construct(
bool $alreadyPaid,
+ bool $isExpired,
string $redirectUrl = null
) {
$this->alreadyPaid = $alreadyPaid;
$this->redirectUrl = $redirectUrl;
+ $this->isExpired = $isExpired;
}
public function isAlreadyPaid(): bool
@@ -38,4 +44,9 @@ public function getRedirectUrl(): ?string
{
return $this->redirectUrl;
}
+
+ public function isExpired(): bool
+ {
+ return $this->isExpired;
+ }
}
diff --git a/Service/Magento/PaymentLinkUrl.php b/Service/Magento/PaymentLinkUrl.php
index 4f93f819d2d..b1e87c495b2 100644
--- a/Service/Magento/PaymentLinkUrl.php
+++ b/Service/Magento/PaymentLinkUrl.php
@@ -54,6 +54,7 @@ public function execute(int $orderId): string
return $this->urlBuilder->getUrl('mollie/checkout/paymentlink', [
'order' => $orderId,
+ '_scope' => $order->getStoreId()
]);
}
diff --git a/Service/Mollie/GetMollieStatusResult.php b/Service/Mollie/GetMollieStatusResult.php
index 66edab8236b..333cb87fb67 100644
--- a/Service/Mollie/GetMollieStatusResult.php
+++ b/Service/Mollie/GetMollieStatusResult.php
@@ -23,6 +23,8 @@ public function __construct(
string $status,
string $method
) {
+ $method = str_replace('mollie_methods_', '', $method);
+
$this->status = $status;
$this->method = $method;
}
@@ -36,4 +38,14 @@ public function getMethod(): string
{
return $this->method;
}
+
+ public function shouldRedirectToSuccessPage(): bool
+ {
+ $status = $this->status;
+ if (in_array($status, ['created', 'open']) && $this->method == 'banktransfer') {
+ return true;
+ }
+
+ return in_array($status, ['pending', 'paid', 'authorized']);
+ }
}
diff --git a/Service/Mollie/Order/IsPaymentLinkExpired.php b/Service/Mollie/Order/IsPaymentLinkExpired.php
new file mode 100644
index 00000000000..befb412cf1f
--- /dev/null
+++ b/Service/Mollie/Order/IsPaymentLinkExpired.php
@@ -0,0 +1,61 @@
+methodCode = $methodCode;
+ $this->expires = $expires;
+ $this->timezone = $timezone;
+ }
+
+ public function execute(OrderInterface $order): bool
+ {
+ $methodCode = $this->methodCode->execute($order);
+ $this->methodCode->getExpiresAtMethod();
+ if (!$this->expires->availableForMethod($methodCode, $order->getStoreId())) {
+ return $this->checkWithDefaultDate($order);
+ }
+
+ $expiresAt = $this->expires->atDateForMethod($methodCode, $order->getStoreId());
+
+ return $expiresAt < $order->getCreatedAt();
+ }
+
+ private function checkWithDefaultDate(OrderInterface $order): bool
+ {
+ $date = $this->timezone->scopeDate($order->getStoreId());
+ $date = $date->add(new \DateInterval('P28D'));
+
+ return $date->format('Y-m-d H:i:s') < $order->getCreatedAt();
+ }
+}
diff --git a/Service/Mollie/Order/SuccessPageRedirect.php b/Service/Mollie/Order/SuccessPageRedirect.php
index a951a35cd84..a599751fbf2 100644
--- a/Service/Mollie/Order/SuccessPageRedirect.php
+++ b/Service/Mollie/Order/SuccessPageRedirect.php
@@ -75,6 +75,12 @@ public function __construct(
$this->config = $config;
}
+ /**
+ * This function has a few responsibilities:
+ * - Check if the user has already been redirected to the success page.
+ * - If not, mark as redirected and actually redirect.
+ * - If already redirected, redirect to the cart page.
+ */
public function execute(OrderInterface $order, array $orderIds): void
{
$this->searchCriteriaBuilder->addFilter('transaction_id', $order->getMollieTransactionId());
diff --git a/Service/Mollie/Order/Transaction/Expires.php b/Service/Mollie/Order/Transaction/Expires.php
index 1afd1723b63..f92b5b64b3f 100644
--- a/Service/Mollie/Order/Transaction/Expires.php
+++ b/Service/Mollie/Order/Transaction/Expires.php
@@ -37,13 +37,13 @@ public function __construct(
$this->request = $request;
}
- public function availableForMethod(string $method = null, $storeId = null)
+ public function availableForMethod(string $method = null, $storeId = null): bool
{
$value = $this->getExpiresAtForMethod($method, $storeId);
return (bool)$value;
}
- public function atDateForMethod(string $method = null, $storeId = null)
+ public function atDateForMethod(string $method = null, $storeId = null): string
{
$days = $this->getExpiresAtForMethod($method, $storeId);
@@ -62,7 +62,7 @@ public function atDateForMethod(string $method = null, $storeId = null)
* @param $storeId
* @return mixed
*/
- public function getExpiresAtForMethod(string $method = null, $storeId = null)
+ public function getExpiresAtForMethod(string $method = null, $storeId = null): ?string
{
if (!$method && $value = $this->getValueFromRequest()) {
return $value;
@@ -76,7 +76,7 @@ public function getExpiresAtForMethod(string $method = null, $storeId = null)
/**
* @return mixed
*/
- private function getValueFromRequest()
+ private function getValueFromRequest(): ?string
{
$payment = $this->request->getParam('payment');
diff --git a/Service/Mollie/PaymentMethods.php b/Service/Mollie/PaymentMethods.php
index b497e7584f3..14641a2a300 100644
--- a/Service/Mollie/PaymentMethods.php
+++ b/Service/Mollie/PaymentMethods.php
@@ -30,6 +30,7 @@ public function __construct(
'mollie_methods_banktransfer',
'mollie_methods_belfius',
'mollie_methods_billie',
+ 'mollie_methods_blik',
'mollie_methods_creditcard',
'mollie_methods_directdebit',
'mollie_methods_eps',
diff --git a/Service/Mollie/ProcessTransaction.php b/Service/Mollie/ProcessTransaction.php
index 1edca5fae29..8f0f570f395 100644
--- a/Service/Mollie/ProcessTransaction.php
+++ b/Service/Mollie/ProcessTransaction.php
@@ -64,17 +64,17 @@ public function __construct(
$this->getMollieStatus = $getMollieStatus;
}
- public function execute(int $orderId, string $transactionId): GetMollieStatusResult
+ public function execute(int $orderId, string $transactionId, string $type = 'webhook'): GetMollieStatusResult
{
if ($this->config->processTransactionsInTheQueue()) {
- $this->queueOrder($orderId, $transactionId);
+ $this->queueOrder($orderId, $transactionId, $type);
return $this->getMollieStatus->execute($orderId);
}
$order = $this->orderRepository->get($orderId);
$order->setMollieTransactionId($transactionId);
- $result = $this->mollieModel->processTransactionForOrder($order, 'webhook');
+ $result = $this->mollieModel->processTransactionForOrder($order, $type);
return $this->getMollieStatusResultFactory->create([
'status' => $result['status'],
@@ -82,12 +82,13 @@ public function execute(int $orderId, string $transactionId): GetMollieStatusRes
]);
}
- private function queueOrder(int $orderId, string $transactionId)
+ private function queueOrder(int $orderId, string $transactionId, string $type): void
{
/** @var TransactionToProcessInterface $data */
$data = $this->transactionToProcessFactory->create();
$data->setOrderId($orderId);
$data->setTransactionId($transactionId);
+ $data->setType($type);
$this->publishTransactionToProcess->publish($data);
}
diff --git a/Service/Order/Lines/Generator/MagentoGiftWrapping.php b/Service/Order/Lines/Generator/MagentoGiftWrapping.php
index 0abb9133249..3e1ba266916 100644
--- a/Service/Order/Lines/Generator/MagentoGiftWrapping.php
+++ b/Service/Order/Lines/Generator/MagentoGiftWrapping.php
@@ -38,7 +38,7 @@ public function process(OrderInterface $order, array $orderLines): array
$extensionAttributes->getGwItemsBasePriceInclTax() :
$extensionAttributes->getGwItemsPriceInclTax();
- if (abs($amount) < 0.01) {
+ if ($amount === null || abs($amount) < 0.01) {
return $orderLines;
}
diff --git a/Test/End-2-end/cypress/e2e/magento/methods/banktransfer.cy.js b/Test/End-2-end/cypress/e2e/magento/methods/banktransfer.cy.js
index 3ae0437e6d4..762d087a9f0 100644
--- a/Test/End-2-end/cypress/e2e/magento/methods/banktransfer.cy.js
+++ b/Test/End-2-end/cypress/e2e/magento/methods/banktransfer.cy.js
@@ -31,7 +31,7 @@ if (Cypress.env('mollie_available_methods').includes('banktransfer')) {
mollieHostedPaymentPage.selectStatus(testCase.status);
- if (testCase.status === 'paid') {
+ if (testCase.status === 'paid' || testCase.status === 'open') {
checkoutSuccessPage.assertThatOrderSuccessPageIsShown();
}
diff --git a/Test/Fakes/Service/Magento/PaymentLinkRedirectFake.php b/Test/Fakes/Service/Magento/PaymentLinkRedirectFake.php
index 277f04a1028..0828404884d 100644
--- a/Test/Fakes/Service/Magento/PaymentLinkRedirectFake.php
+++ b/Test/Fakes/Service/Magento/PaymentLinkRedirectFake.php
@@ -14,6 +14,7 @@
use Mollie\Payment\Service\Magento\PaymentLinkRedirect;
use Mollie\Payment\Service\Magento\PaymentLinkRedirectResult;
use Mollie\Payment\Service\Magento\PaymentLinkRedirectResultFactory;
+use Mollie\Payment\Service\Mollie\Order\IsPaymentLinkExpired;
class PaymentLinkRedirectFake extends PaymentLinkRedirect
{
@@ -30,17 +31,26 @@ public function __construct(
EncryptorInterface $encryptor,
OrderRepositoryInterface $orderRepository,
Mollie $mollie,
- PaymentLinkRedirectResultFactory $paymentLinkRedirectResultFactory
+ PaymentLinkRedirectResultFactory $paymentLinkRedirectResultFactory,
+ IsPaymentLinkExpired $isPaymentLinkExpired
) {
- parent::__construct($encryptor, $orderRepository, $mollie, $paymentLinkRedirectResultFactory);
+ parent::__construct(
+ $encryptor,
+ $orderRepository,
+ $mollie,
+ $paymentLinkRedirectResultFactory,
+ $isPaymentLinkExpired
+ );
+
$this->paymentLinkRedirectResultFactory = $paymentLinkRedirectResultFactory;
}
- public function fakeResponse(?string $redirectUrl, bool $alreadyPaid)
+ public function fakeResponse(?string $redirectUrl, bool $alreadyPaid, bool $isExpired): void
{
$this->result = $this->paymentLinkRedirectResultFactory->create([
'alreadyPaid' => $alreadyPaid,
'redirectUrl' => $redirectUrl,
+ 'isExpired' => $isExpired,
]);
}
diff --git a/Test/Fakes/Service/Mollie/ProcessTransactionFake.php b/Test/Fakes/Service/Mollie/ProcessTransactionFake.php
index d45f73009d0..b04ae277c47 100644
--- a/Test/Fakes/Service/Mollie/ProcessTransactionFake.php
+++ b/Test/Fakes/Service/Mollie/ProcessTransactionFake.php
@@ -30,7 +30,7 @@ public function setResponse(GetMollieStatusResult $response): void
$this->response = $response;
}
- public function execute(int $orderId, string $transactionId): GetMollieStatusResult
+ public function execute(int $orderId, string $transactionId, string $type = 'webhook'): GetMollieStatusResult
{
$this->timesCalled++;
@@ -38,6 +38,6 @@ public function execute(int $orderId, string $transactionId): GetMollieStatusRes
return $this->response;
}
- return parent::execute($orderId, $transactionId); // TODO: Change the autogenerated stub
+ return parent::execute($orderId, $transactionId, $type);
}
}
diff --git a/Test/Integration/Etc/Config/MethodsConfigurationTest.php b/Test/Integration/Etc/Config/MethodsConfigurationTest.php
index 4c1307f9b1e..48417145f59 100644
--- a/Test/Integration/Etc/Config/MethodsConfigurationTest.php
+++ b/Test/Integration/Etc/Config/MethodsConfigurationTest.php
@@ -19,6 +19,7 @@ public function methods(): array
['mollie_methods_banktransfer'],
['mollie_methods_belfius'],
['mollie_methods_billie'],
+ ['mollie_methods_blik'],
['mollie_methods_creditcard'],
['mollie_methods_directdebit'],
['mollie_methods_eps'],
diff --git a/Test/Integration/GraphQL/Resolver/Checkout/PaymentLinkRedirectTest.php b/Test/Integration/GraphQL/Resolver/Checkout/PaymentLinkRedirectTest.php
index e4936e6f1e3..2713c9d6741 100644
--- a/Test/Integration/GraphQL/Resolver/Checkout/PaymentLinkRedirectTest.php
+++ b/Test/Integration/GraphQL/Resolver/Checkout/PaymentLinkRedirectTest.php
@@ -20,7 +20,7 @@ class PaymentLinkRedirectTest extends GraphQLTestCase
public function testReturnsValidResultWhenNotYetPaid(): void
{
$fakeInstance = $this->objectManager->get(PaymentLinkRedirectFake::class);
- $fakeInstance->fakeResponse('https://www.example.com', false);
+ $fakeInstance->fakeResponse('https://www.example.com', false, false);
$this->objectManager->addSharedInstance($fakeInstance, PaymentLinkRedirect::class);
@@ -31,18 +31,20 @@ public function testReturnsValidResultWhenNotYetPaid(): void
molliePaymentLinkRedirect(order: "999") {
already_paid
redirect_url
+ is_expired
}
}
');
$this->assertSame($result['molliePaymentLinkRedirect']['redirect_url'], 'https://www.example.com');
$this->assertSame($result['molliePaymentLinkRedirect']['already_paid'], false);
+ $this->assertSame($result['molliePaymentLinkRedirect']['is_expired'], false);
}
public function testReturnsValidResultWhenAlreadyPaid(): void
{
$fakeInstance = $this->objectManager->get(PaymentLinkRedirectFake::class);
- $fakeInstance->fakeResponse(null, true);
+ $fakeInstance->fakeResponse(null, true, false);
$this->objectManager->addSharedInstance($fakeInstance, PaymentLinkRedirect::class);
@@ -51,11 +53,35 @@ public function testReturnsValidResultWhenAlreadyPaid(): void
molliePaymentLinkRedirect(order: "999") {
already_paid
redirect_url
+ is_expired
}
}
');
$this->assertSame($result['molliePaymentLinkRedirect']['redirect_url'], null);
$this->assertSame($result['molliePaymentLinkRedirect']['already_paid'], true);
+ $this->assertSame($result['molliePaymentLinkRedirect']['is_expired'], false);
+ }
+
+ public function testReturnsValidResultWhenExpired(): void
+ {
+ $fakeInstance = $this->objectManager->get(PaymentLinkRedirectFake::class);
+ $fakeInstance->fakeResponse(null, false, true);
+
+ $this->objectManager->addSharedInstance($fakeInstance, PaymentLinkRedirect::class);
+
+ $result = $this->graphQlQuery('
+ mutation {
+ molliePaymentLinkRedirect(order: "999") {
+ already_paid
+ redirect_url
+ is_expired
+ }
+ }
+ ');
+
+ $this->assertSame($result['molliePaymentLinkRedirect']['redirect_url'], null);
+ $this->assertSame($result['molliePaymentLinkRedirect']['already_paid'], false);
+ $this->assertSame($result['molliePaymentLinkRedirect']['is_expired'], true);
}
}
diff --git a/Test/Integration/Helper/GeneralTest.php b/Test/Integration/Helper/GeneralTest.php
index 94ef84a9c4b..3b2b99d9e5d 100644
--- a/Test/Integration/Helper/GeneralTest.php
+++ b/Test/Integration/Helper/GeneralTest.php
@@ -142,6 +142,7 @@ public function getMethodCodeDataProvider()
'banktransfer' => ['mollie_methods_banktransfer', 'banktransfer'],
'belfius' => ['mollie_methods_belfius', 'belfius'],
'billie' => ['mollie_methods_billie', 'billie'],
+ 'blik' => ['mollie_methods_blik', 'blik'],
'creditcard' => ['mollie_methods_creditcard', 'creditcard'],
'directdebit' => ['mollie_methods_directdebit', 'directdebit'],
'eps' => ['mollie_methods_eps', 'eps'],
diff --git a/Test/Integration/Model/Methods/BlikTest.php b/Test/Integration/Model/Methods/BlikTest.php
new file mode 100644
index 00000000000..1ef3439be53
--- /dev/null
+++ b/Test/Integration/Model/Methods/BlikTest.php
@@ -0,0 +1,16 @@
+assertArrayHasKey('mollie_methods_banktransfer', $result['payment']['image']);
$this->assertArrayHasKey('mollie_methods_belfius', $result['payment']['image']);
$this->assertArrayHasKey('mollie_methods_billie', $result['payment']['image']);
+ $this->assertArrayHasKey('mollie_methods_blik', $result['payment']['image']);
$this->assertArrayHasKey('mollie_methods_creditcard', $result['payment']['image']);
$this->assertArrayHasKey('mollie_methods_directdebit', $result['payment']['image']);
$this->assertArrayHasKey('mollie_methods_eps', $result['payment']['image']);
diff --git a/Test/Integration/Service/Config/PaymentFeeTest.php b/Test/Integration/Service/Config/PaymentFeeTest.php
index 400645f0426..e6407b4ef7b 100644
--- a/Test/Integration/Service/Config/PaymentFeeTest.php
+++ b/Test/Integration/Service/Config/PaymentFeeTest.php
@@ -28,6 +28,7 @@ public function isAvailableForMethodProvider()
['mollie_methods_banktransfer', true],
['mollie_methods_belfius', true],
['mollie_methods_billie', true],
+ ['mollie_methods_blik', true],
['mollie_methods_creditcard', true],
['mollie_methods_directdebit', true],
['mollie_methods_eps', true],
diff --git a/Test/Integration/Service/Mollie/GetMollieStatusResultTest.php b/Test/Integration/Service/Mollie/GetMollieStatusResultTest.php
new file mode 100644
index 00000000000..f974a221726
--- /dev/null
+++ b/Test/Integration/Service/Mollie/GetMollieStatusResultTest.php
@@ -0,0 +1,74 @@
+objectManager->create(GetMollieStatusResult::class, [
+ 'status' => 'created',
+ 'method' => 'mollie_methods_banktransfer',
+ ]);
+
+ $this->assertEquals('banktransfer', $instance->getMethod());
+ }
+
+ /**
+ * @dataProvider returnsTheCorrectStatusForBanktransferProvider
+ * @return void
+ */
+ public function testReturnsTheCorrectStatusForBanktransfer(string $status, string $method): void
+ {
+ $instance = $this->objectManager->create(GetMollieStatusResult::class, [
+ 'status' => $status,
+ 'method' => $method,
+ ]);
+
+ $this->assertTrue($instance->shouldRedirectToSuccessPage());
+ }
+
+ public function returnsTheCorrectStatusForBanktransferProvider(): array
+ {
+ return [
+ 'created, banktransfer' => ['created', 'banktransfer'],
+ 'created, mollie_methods_banktransfer' => ['created', 'mollie_methods_banktransfer'],
+ 'open, banktransfer' => ['open', 'banktransfer'],
+ 'open, mollie_methods_banktransfer' => ['open', 'mollie_methods_banktransfer'],
+ ];
+ }
+
+ /**
+ * @dataProvider returnsToSuccessWhenNotBanktransferButHasTheCorrectStatusProvider
+ * @return void
+ */
+ public function testReturnsToSuccessWhenNotBanktransferButHasTheCorrectStatus(string $status, string $method): void
+ {
+ $instance = $this->objectManager->create(GetMollieStatusResult::class, [
+ 'status' => $status,
+ 'method' => $method,
+ ]);
+
+ $this->assertTrue($instance->shouldRedirectToSuccessPage());
+ }
+
+ public function returnsToSuccessWhenNotBanktransferButHasTheCorrectStatusProvider(): array
+ {
+ return [
+ 'paid, ideal' => ['paid', 'ideal'],
+ 'paid, mollie_methods_ideal' => ['paid', 'mollie_methods_ideal'],
+ 'pending, ideal' => ['pending', 'ideal'],
+ 'authorized, klarnapaylater' => ['authorized', 'klarnapaylater'],
+ 'authorized, mollie_methods_klarnapaylater' => ['authorized', 'mollie_methods_klarnapaylater'],
+ ];
+ }
+}
diff --git a/Test/Integration/Service/Mollie/Order/IsPaymentLinkExpiredTest.php b/Test/Integration/Service/Mollie/Order/IsPaymentLinkExpiredTest.php
new file mode 100644
index 00000000000..4efeb9b5522
--- /dev/null
+++ b/Test/Integration/Service/Mollie/Order/IsPaymentLinkExpiredTest.php
@@ -0,0 +1,93 @@
+loadOrder('100000001');
+ $order->getPayment()->setMethod(Paymentlink::CODE);
+
+ $date = new \DateTimeImmutable();
+ $date = $date->add(new \DateInterval('P28D'))->setTime(0, 0, 0);
+ $order->setcreatedAt($date->format('Y-m-d H:i:s'));
+
+ $instance = $this->objectManager->create(IsPaymentLinkExpired::class);
+
+ $this->assertFalse($instance->execute($order));
+ }
+ /**
+ * @magentoDataFixture Magento/Sales/_files/order.php
+ * @return void
+ */
+ public function testIsInvalidTheDayAfterTheDefaultExpire(): void
+ {
+ $order = $this->loadOrder('100000001');
+ $order->getPayment()->setMethod(Paymentlink::CODE);
+
+ $date = new \DateTimeImmutable();
+ $date = $date->add(new \DateInterval('P29D'))->setTime(23, 59, 59);
+ $order->setcreatedAt($date->format('Y-m-d H:i:s'));
+
+ $instance = $this->objectManager->create(IsPaymentLinkExpired::class);
+
+ $this->assertTrue($instance->execute($order));
+ }
+
+ /**
+ * @magentoDataFixture Magento/Sales/_files/order.php
+ * @magentoConfigFixture default_store payment/mollie_methods_ideal/days_before_expire 10
+ * @return void
+ */
+ public function testIsValidWhenAvailableForMethodIsSetTheDayBefore(): void
+ {
+ $order = $this->loadOrder('100000001');
+ $order->getPayment()->setMethod(Paymentlink::CODE);
+
+ $date = new \DateTimeImmutable();
+ $date = $date->add(new \DateInterval('P9D'))->setTime(0, 0, 0);
+ $order->setcreatedAt($date->format('Y-m-d H:i:s'));
+
+ $order->getPayment()->setAdditionalInformation(['limited_methods' => ['ideal']]);
+
+ $instance = $this->objectManager->create(IsPaymentLinkExpired::class);
+
+ $this->assertFalse($instance->execute($order));
+ }
+
+ /**
+ * @magentoDataFixture Magento/Sales/_files/order.php
+ * @magentoConfigFixture default_store payment/mollie_methods_ideal/days_before_expire 10
+ * @return void
+ */
+ public function testIsValidWhenAvailableForMethodIsSetTheDayAfter(): void
+ {
+ $order = $this->loadOrder('100000001');
+ $order->getPayment()->setMethod(Paymentlink::CODE);
+
+ $date = new \DateTimeImmutable();
+ $date = $date->add(new \DateInterval('P11D'))->setTime(23, 59, 59);
+ $order->setcreatedAt($date->format('Y-m-d H:i:s'));
+
+ $order->getPayment()->setAdditionalInformation(['limited_methods' => ['ideal']]);
+
+ $instance = $this->objectManager->create(IsPaymentLinkExpired::class);
+
+ $this->assertTrue($instance->execute($order));
+ }
+}
diff --git a/composer.json b/composer.json
index b4b61e1386a..093a2b74859 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
{
"name": "mollie/magento2",
"description": "Mollie Payment Module for Magento 2",
- "version": "2.35.1",
+ "version": "2.36.0",
"keywords": [
"mollie",
"payment",
@@ -12,6 +12,7 @@
"belfius",
"belfius direct net",
"billie",
+ "blik",
"cbc",
"creditcard",
"directdebit",
@@ -48,7 +49,7 @@
"magento 2"
],
"require": {
- "mollie/mollie-api-php": "^2.1",
+ "mollie/mollie-api-php": "^2.65",
"magento/framework": ">=102.0.3",
"magento/module-backend": ">=100.3.3",
"magento/module-catalog": ">=100.3.3",
diff --git a/etc/adminhtml/methods.xml b/etc/adminhtml/methods.xml
index 68419f9501d..5f89c4f63b6 100644
--- a/etc/adminhtml/methods.xml
+++ b/etc/adminhtml/methods.xml
@@ -11,6 +11,7 @@
+
diff --git a/etc/adminhtml/methods/applepay.xml b/etc/adminhtml/methods/applepay.xml
index ee0fb9bf2f1..e9589d4e6b5 100644
--- a/etc/adminhtml/methods/applepay.xml
+++ b/etc/adminhtml/methods/applepay.xml
@@ -1,7 +1,7 @@
-
-
-
-
-
+
+
+
+
+
+ Magento\Config\Model\Config\Source\Yesno
+ payment/mollie_methods_blik/active
+
+
+
+ payment/mollie_methods_blik/title
+
+ 1
+
+
+
+
+ Mollie\Payment\Model\Adminhtml\Source\Method
+ payment/mollie_methods_blik/method
+
+ 1
+
+ here
+ to read more about the differences between the Payment and Orders API.]]>
+
+
+
+ payment/mollie_methods_blik/payment_description
+
+
+ payment
+ 1
+
+
+
+
+ Magento\Payment\Model\Config\Source\Allspecificcountries
+ payment/mollie_methods_blik/allowspecific
+
+ 1
+
+
+
+
+ Magento\Directory\Model\Config\Source\Country
+ 1
+ payment/mollie_methods_blik/specificcountry
+
+ 1
+
+
+
+
+ payment/mollie_methods_blik/min_order_total
+
+ 1
+
+
+
+
+ payment/mollie_methods_blik/max_order_total
+
+ 1
+
+
+
+
+ payment/mollie_methods_blik/payment_surcharge_type
+ Mollie\Payment\Model\Adminhtml\Source\PaymentFeeType
+
+ 1
+
+
+
+
+ payment/mollie_methods_blik/payment_surcharge_fixed_amount
+ Mollie\Payment\Model\Adminhtml\Backend\VerifiyPaymentFee
+ validate-not-negative-number
+
+ 1
+ fixed_fee,fixed_fee_and_percentage
+
+
+
+
+ payment/mollie_methods_blik/payment_surcharge_percentage
+ Mollie\Payment\Model\Adminhtml\Backend\VerifiyPaymentFee
+ validate-number-range number-range-0-10
+
+ 1
+ percentage,fixed_fee_and_percentage
+
+
+
+
+ payment/mollie_methods_blik/payment_surcharge_limit
+
+ Mollie\Payment\Model\Adminhtml\Backend\VerifiyPaymentFee
+ validate-not-negative-number
+
+ 1
+ percentage,fixed_fee_and_percentage
+
+
+
+
+ payment/mollie_methods_blik/payment_surcharge_tax_class
+ \Magento\Tax\Model\TaxClass\Source\Product
+
+ 1
+ fixed_fee,percentage,fixed_fee_and_percentage
+
+
+
+
+ validate-number
+ payment/mollie_methods_blik/sort_order
+
+ 1
+
+
+
+
+ validate-digits-range digits-range-1-365
+ payment/mollie_methods_blik/days_before_expire
+
+ 1
+ order
+
+
+
+
+
diff --git a/etc/config.xml b/etc/config.xml
index 32a5b285514..9473b6fa3fc 100644
--- a/etc/config.xml
+++ b/etc/config.xml
@@ -3,7 +3,7 @@
- v2.35.1
+ v2.36.0
0
0
test
@@ -149,6 +149,25 @@
0
1
+
+ 1
+ Mollie\Payment\Model\Methods\Blik
+ Blik
+ {ordernumber}
+ payment
+ order
+ 0
+
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 0
+ 1
+
1
Mollie\Payment\Model\Methods\Creditcard
diff --git a/etc/di.xml b/etc/di.xml
index 312a24c85ca..4d3d9700cfa 100644
--- a/etc/di.xml
+++ b/etc/di.xml
@@ -348,7 +348,8 @@
- - ^/mollie/.*
+ - ^/mollie/checkout/webhook.*
+ - ^/mollie/checkout/secondchance.*
@@ -591,6 +592,51 @@
+
+
+
+ Magento\Payment\Block\Form
+ Mollie\Payment\Block\Info\Base
+ MollieBlikValueHandlerPool
+ MollieCommandPool
+ MollieBlikValidatorPool
+
+
+
+
+
+
+ - MollieBlikConfigValueHandler
+
+
+
+
+
+
+ MollieBlikConfig
+
+
+
+
+
+ Mollie\Payment\Model\Methods\Blik::CODE
+
+
+
+
+
+
+ - MollieBlikCountryValidator
+
+
+
+
+
+
+ MollieBlikConfig
+
+
+
diff --git a/etc/graphql/di.xml b/etc/graphql/di.xml
index ffe57fbf363..59ef874468c 100644
--- a/etc/graphql/di.xml
+++ b/etc/graphql/di.xml
@@ -8,6 +8,7 @@
- Mollie\Payment\GraphQL\DataProvider
- Mollie\Payment\GraphQL\DataProvider
- Mollie\Payment\GraphQL\DataProvider
+ - Mollie\Payment\GraphQL\DataProvider
- Mollie\Payment\GraphQL\DataProvider
- Mollie\Payment\GraphQL\DataProvider
- Mollie\Payment\GraphQL\DataProvider
diff --git a/etc/payment.xml b/etc/payment.xml
index 58a34ee9f49..f8dc5d320f8 100644
--- a/etc/payment.xml
+++ b/etc/payment.xml
@@ -16,6 +16,9 @@
0
+
+ 0
+
0
diff --git a/etc/schema.graphqls b/etc/schema.graphqls
index 32fdf3903a8..c68bcf9d994 100644
--- a/etc/schema.graphqls
+++ b/etc/schema.graphqls
@@ -115,6 +115,7 @@ type MollieApplePayValidationOutput {
type MolliePaymentLinkRedirectOutput {
redirect_url: String
already_paid: Boolean!
+ is_expired: Boolean!
}
input PaymentMethodInput {
diff --git a/view/adminhtml/templates/form/mollie_paymentlink.phtml b/view/adminhtml/templates/form/mollie_paymentlink.phtml
index f74f0f35d32..ffe61817f6b 100644
--- a/view/adminhtml/templates/form/mollie_paymentlink.phtml
+++ b/view/adminhtml/templates/form/mollie_paymentlink.phtml
@@ -21,6 +21,7 @@ $code; ?>" style="display:none">
+
diff --git a/view/adminhtml/web/images/blik.svg b/view/adminhtml/web/images/blik.svg
new file mode 100644
index 00000000000..9b430f2a80d
--- /dev/null
+++ b/view/adminhtml/web/images/blik.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/view/frontend/layout/checkout_index_index.xml b/view/frontend/layout/checkout_index_index.xml
index d89ec3e7119..acf3cc6b088 100644
--- a/view/frontend/layout/checkout_index_index.xml
+++ b/view/frontend/layout/checkout_index_index.xml
@@ -37,6 +37,9 @@
-
- true
+ -
+
- true
+
-
- true
diff --git a/view/frontend/web/images/methods/blik.svg b/view/frontend/web/images/methods/blik.svg
new file mode 100644
index 00000000000..9b430f2a80d
--- /dev/null
+++ b/view/frontend/web/images/methods/blik.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/view/frontend/web/js/view/payment/method-renderer.js b/view/frontend/web/js/view/payment/method-renderer.js
index 6c982ec556c..79f9192e4c7 100644
--- a/view/frontend/web/js/view/payment/method-renderer.js
+++ b/view/frontend/web/js/view/payment/method-renderer.js
@@ -28,6 +28,7 @@ define(
{type: 'mollie_methods_banktransfer', component: defaultComponent},
{type: 'mollie_methods_belfius', component: defaultComponent},
{type: 'mollie_methods_billie', component: billieComponent},
+ {type: 'mollie_methods_blik', component: defaultComponent},
{type: 'mollie_methods_creditcard', component: creditcardComponent},
{type: 'mollie_methods_directdebit', component: defaultComponent},
{type: 'mollie_methods_eps', component: defaultComponent},