Skip to content

Commit

Permalink
MAGETWO-42103: Minicart does not clear after completing an order via …
Browse files Browse the repository at this point in the history
…Paypal
  • Loading branch information
irenelagno committed Aug 28, 2015
1 parent 56dc34f commit 1c5bd87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 0 additions & 6 deletions app/code/Magento/Checkout/etc/frontend/sections.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,4 @@
<action name="rest/*/V1/guest-carts/*/payment-information">
<section name="cart"/>
</action>
<action name="rest/*/V1/guest-carts/*/selected-payment-method">
<section name="cart"/>
</action>
<action name="rest/*/V1/carts/*/selected-payment-method">
<section name="cart"/>
</action>
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ define(
'Magento_Checkout/js/model/url-builder',
'mage/storage',
'Magento_Checkout/js/model/error-processor',
'Magento_Customer/js/model/customer'
'Magento_Customer/js/model/customer',
'Magento_Customer/js/customer-data'
],
function ($, quote, urlBuilder, storage, errorProcessor, customer) {
function ($, quote, urlBuilder, storage, errorProcessor, customer, customerData) {
'use strict';

return function () {
Expand Down Expand Up @@ -41,6 +42,7 @@ define(
serviceUrl, JSON.stringify(payload)
).done(
function () {
customerData.invalidate(['cart']);
$.mage.redirect(window.checkoutConfig.payment.paypalExpress.redirectUrl[quote.paymentMethod().method]);
}
).fail(
Expand Down

0 comments on commit 1c5bd87

Please sign in to comment.