Skip to content

Commit 656ad1e

Browse files
authored
Merge pull request #48 from logeecom/5.0
Release 5.2.1
2 parents 6737a7b + 2e350c3 commit 656ad1e

File tree

5 files changed

+45
-5
lines changed

5 files changed

+45
-5
lines changed

IntegrationCore/BusinessLogic/Http/DTO/Orders/Order.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ class Order extends BaseDto
119119
* @var string
120120
*/
121121
protected $redirectUrl;
122+
/**
123+
* @var string
124+
*/
125+
protected $cancelUrl;
122126
/**
123127
* @var string
124128
*/
@@ -179,6 +183,7 @@ public static function fromArray(array $raw)
179183
$shippingAddress = static::getValue($raw, 'shippingAddress', array());
180184
$order->shippingAddress = !empty($shippingAddress) ? Address::fromArray($shippingAddress) : null;
181185
$order->redirectUrl = static::getValue($raw, 'redirectUrl');
186+
$order->cancelUrl = static::getValue($raw, 'cancelUrl');
182187
$order->webhookUrl = static::getValue($raw, 'webhookUrl');
183188
$order->cardToken = static::getValue($raw, 'cardToken');
184189
$order->setLines(OrderLine::fromArrayBatch(static::getValue($raw, 'lines', array())));
@@ -254,6 +259,7 @@ public function toArray()
254259
'orderNumber' => $this->orderNumber,
255260
'shippingAddress' => $this->shippingAddress ? $this->shippingAddress->toArray() : array(),
256261
'redirectUrl' => $this->redirectUrl,
262+
'cancelUrl' => $this->cancelUrl,
257263
'webhookUrl' => $this->webhookUrl,
258264
'payment' => $this->payment ? $this->payment->toArray() : null,
259265
'lines' => $lines,
@@ -673,6 +679,22 @@ public function setRedirectUrl($redirectUrl)
673679
$this->redirectUrl = $redirectUrl;
674680
}
675681

682+
/**
683+
* @return string
684+
*/
685+
public function getCancelUrl()
686+
{
687+
return $this->cancelUrl;
688+
}
689+
690+
/**
691+
* @param string $cancelUrl
692+
*/
693+
public function setCancelUrl($cancelUrl)
694+
{
695+
$this->cancelUrl = $cancelUrl;
696+
}
697+
676698
/**
677699
* @return string
678700
*/

IntegrationCore/BusinessLogic/Http/OrgToken/ProxyDataProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public function transformOrder(Order $order)
9898
'orderNumber' => $order->getOrderNumber(),
9999
'billingAddress' => $this->transformAddress($order->getBillingAddress()),
100100
'redirectUrl' => $order->getRedirectUrl(),
101+
'cancelUrl' => $order->getCancelUrl(),
101102
'webhookUrl' => $order->getWebhookUrl(),
102103

103104
'locale' => $order->getLocale(),

Mapper/MollieDtoMapper.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,13 @@ public function getOrderData(PaymentTransaction $paymentTransaction)
185185
UrlGeneratorInterface::ABSOLUTE_URL
186186
)
187187
),
188+
'cancelUrl' => $this->ensureDebugWebhookUrl(
189+
$this->router->generate(
190+
'oro_payment_callback_error',
191+
['accessIdentifier' => $paymentTransaction->getAccessIdentifier()],
192+
UrlGeneratorInterface::ABSOLUTE_URL
193+
)
194+
),
188195
'payment' => [
189196
'issuer' => $this->getRequestParam('mollie-issuer', $paymentTransaction->getPaymentMethod()),
190197
'cardToken' => $cardToken,

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,17 @@ To finalize the installation you need to enter your organization API token in th
2626
Read more about the integration configuration on [our Wiki](https://github.com/mollie/orocommerce/wiki).
2727

2828
## Release notes
29-
- **5.0.10:**
30-
- Added support for OroCommerce 5.0.0.
31-
- Added single-click payments.
32-
- Added surcharge rules.
29+
30+
**5.2.1:**
31+
- Added cancel url to fix issue caused by clicking "previous page" on Mollie hosted payment page
32+
33+
**5.2.0:**
34+
- Update from iDeal 1.0 to iDeal 2.0
35+
36+
**5.1.0:**
37+
- Added compatibility with OroCommerce 5.1.0
38+
39+
**5.0.10:**
40+
- Added support for OroCommerce 5.0.0.
41+
- Added single-click payments.
42+
- Added surcharge rules.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mollie/orocommerce",
3-
"version": "5.2.0",
3+
"version": "5.2.1",
44
"type": "symfony-bundle",
55
"description": "Mollie Payment Module for OroCommerce",
66
"keywords": [

0 commit comments

Comments
 (0)