Skip to content

Commit 5636a71

Browse files
Merge pull request #672 from mollie/release/2.29.1
Release/2.29.1
2 parents 5104662 + 186203f commit 5636a71

File tree

7 files changed

+9
-8
lines changed

7 files changed

+9
-8
lines changed

.github/workflows/end-2-end-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ jobs:
1919
env:
2020
MOLLIE_API_KEY_TEST: ${{ secrets.MOLLIE_API_KEY_TEST }}
2121
if: "${{ env.MOLLIE_API_KEY_TEST != '' }}"
22-
run: echo "is_mollie_api_key_test_set=true" >> $GITHUB_OUTPUT
22+
# Disabled for now. Change to =true to re-enable.
23+
run: echo "is_mollie_api_key_test_set=false" >> $GITHUB_OUTPUT
2324

2425
# Remove flag used to trigger the e2e tests
2526
remove_flag:

Model/Client/Payments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public function startTransaction(Order $order, $mollieApi)
221221
$orderId = $order->getEntityId();
222222

223223
$transactionId = $order->getMollieTransactionId();
224-
if (!empty($transactionId) && !preg_match('/^ord_\w+$/', $transactionId)) {
224+
if (!empty($transactionId) && substr($transactionId, 0, 4) != 'ord_') {
225225
$payment = $mollieApi->payments->get($transactionId);
226226
return $payment->getCheckoutUrl();
227227
}

Model/Mollie.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ public function processTransactionForOrder(OrderInterface $order, $type = 'webho
360360
$type,
361361
$paymentToken
362362
) {
363-
if (preg_match('/^ord_\w+$/', $transactionId)) {
363+
if (substr($transactionId, 0, 4) == 'ord_') {
364364
$result = $this->ordersProcessTraction->execute($order, $type)->toArray();
365365
} else {
366366
$mollieApi = $this->mollieApiClient->loadByStore($order->getStoreId());
@@ -398,7 +398,7 @@ public function orderHasUpdate($orderId)
398398

399399
$mollieApi = $this->mollieApiClient->loadByStore($order->getStoreId());
400400

401-
if (preg_match('/^ord_\w+$/', $transactionId)) {
401+
if (substr($transactionId, 0, 4) == 'ord_') {
402402
return $this->ordersApi->orderHasUpdate($order, $mollieApi);
403403
} else {
404404
return $this->paymentsApi->orderHasUpdate($order, $mollieApi);

Observer/SalesOrderShipmentSaveBefore/CreateMollieShipment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function execute(Observer $observer)
5555
$order = $shipment->getOrder();
5656

5757
$transactionId = $order->getMollieTransactionId() ?? '';
58-
$useOrdersApi = preg_match('/^ord_\w+$/', $transactionId);
58+
$useOrdersApi = substr($transactionId, 0, 4) == 'ord_';
5959
if ($useOrdersApi) {
6060
$this->ordersApi->createShipment($shipment, $order);
6161
}

Service/Mollie/Order/CreateInvoiceOnShipment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function execute(OrderInterface $order): bool
3333
}
3434

3535
$transactionId = $order->getMollieTransactionId() ?? '';
36-
$api = preg_match('/^ord_\w+$/', $transactionId) ? 'orders' : 'payments';
36+
$api = substr($transactionId, 0, 4) == 'ord_' ? 'orders' : 'payments';
3737
if ($methodCode == 'mollie_methods_creditcard' &&
3838
$this->config->useManualCapture($order->getStoreId()) &&
3939
$api == 'payments'

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mollie/magento2",
33
"description": "Mollie Payment Module for Magento 2",
4-
"version": "2.29.0",
4+
"version": "2.29.1",
55
"keywords": [
66
"mollie",
77
"payment",

etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<default>
44
<payment>
55
<mollie_general>
6-
<version>v2.29.0</version>
6+
<version>v2.29.1</version>
77
<active>0</active>
88
<enabled>0</enabled>
99
<type>test</type>

0 commit comments

Comments
 (0)