Skip to content

Commit 172e3b2

Browse files
author
Joan He
committed
MAGETWO-94269: PayPal advanced payments won't process payment due to an incorrect redirect after a silent post
- address code review comments
1 parent 00e3b5e commit 172e3b2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/code/Magento/Paypal/Controller/Payflow/ReturnUrl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function execute()
6868
if ($order->getIncrementId()) {
6969
if ($this->checkOrderState($order)) {
7070
$redirectBlock->setData('goto_success_page', true);
71-
$this->_eventManager->dispatch('checkout_success', ['order' => $order]);
71+
$this->_eventManager->dispatch('paypal_checkout_success', ['order' => $order]);
7272
} else {
7373
if ($this->checkPaymentMethod($order)) {
7474
$gotoSection = $this->_cancelPayment((string)$this->getRequest()->getParam('RESPMSG'));

app/code/Magento/Paypal/Test/Unit/Controller/Payflow/ReturnUrlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public function testExecuteAllowedOrderState($state)
201201

202202
$this->eventManagerMock->expects($this->once())
203203
->method('dispatch')
204-
->with('checkout_success', $this->arrayHasKey('order'));
204+
->with('paypal_checkout_success', $this->arrayHasKey('order'));
205205

206206
$result = $this->returnUrl->execute();
207207
$this->assertNull($result);

app/code/Magento/Signifyd/etc/events.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<event name="paypal_express_place_order_success">
1313
<observer name="signifyd_place_order_paypal_express_observer" instance="Magento\Signifyd\Observer\PlaceOrder"/>
1414
</event>
15-
<event name="checkout_success">
15+
<event name="paypal_checkout_success">
1616
<observer name="signifyd_place_order_checkout_success_observer" instance="Magento\Signifyd\Observer\PlaceOrder" />
1717
</event>
1818
</config>

0 commit comments

Comments
 (0)