Skip to content

Commit 3983a3f

Browse files
author
Anna Bukatar
committed
ACP2E-1029: Reward Points not added to orders after applying coupon
1 parent d379b7f commit 3983a3f

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

app/code/Magento/Paypal/Controller/Express/AbstractExpress/PlaceOrder.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,14 @@ public function execute()
112112
->setLastOrderStatus($order->getStatus());
113113
}
114114

115+
$this->_eventManager->dispatch(
116+
'checkout_submit_all_after',
117+
[
118+
'order' => $order,
119+
'quote' => $this->_getQuote()
120+
]
121+
);
122+
115123
$this->_eventManager->dispatch(
116124
'paypal_express_place_order_success',
117125
[

app/code/Magento/Paypal/Controller/Express/OnAuthorization.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,14 @@ public function execute(): ResultInterface
142142
->setLastRealOrderId($order->getIncrementId())
143143
->setLastOrderStatus($order->getStatus());
144144

145+
$this->_eventManager->dispatch(
146+
'checkout_submit_all_after',
147+
[
148+
'order' => $order,
149+
'quote' => $quote
150+
]
151+
);
152+
145153
$this->_eventManager->dispatch(
146154
'paypal_express_place_order_success',
147155
[
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StoreFrontCheckoutAsRegisteredUSCustomerUsingSalesRuleWithRewardPointsTest" extends="OnePageCheckoutAsRegisteredUSCustomerUsingSalesRuleWithRewardPointsTest">
12+
<annotations>
13+
<features value="PayPal"/>
14+
<stories value="Payment methods"/>
15+
<title value="Checkout as registered US customer using PayPal express and sales rule with reward points test"/>
16+
<description value="Checkout as registered US customer using PayPal express and sales rule with reward points"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-xxxxx"/>
19+
<group value="reward"/>
20+
<group value="paypal"/>
21+
<group value="paypalExpress"/>
22+
</annotations>
23+
<before>
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
25+
<actionGroup ref="AdminPayPalExpressCheckoutEnableActionGroup" stepKey="ConfigPayPalExpress">
26+
<argument name="credentials" value="SamplePaypalExpressConfig"/>
27+
</actionGroup>
28+
</before>
29+
<after>
30+
<!-- Disabled payment method -->
31+
<magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/>
32+
</after>
33+
</test>
34+
</tests>

0 commit comments

Comments
 (0)