Skip to content

Commit b026110

Browse files
author
Viktor Tymchynskyi
committed
Merge remote-tracking branch 'origin/MAGETWO-50910' into MPI-BUGFIXES
2 parents eb09b52 + c962c91 commit b026110

File tree

1 file changed

+10
-0
lines changed
  • app/code/Magento/Paypal/view/frontend/web/js/view/payment/method-renderer

1 file changed

+10
-0
lines changed

app/code/Magento/Paypal/view/frontend/web/js/view/payment/method-renderer/iframe-methods.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ define(
5050
*/
5151
placePendingPaymentOrder: function () {
5252
if (this.placeOrder()) {
53+
fullScreenLoader.startLoader();
5354
this.isInAction(true);
5455
// capture all click events
5556
document.addEventListener('click', iframe.stopEventPropagation, true);
@@ -61,6 +62,7 @@ define(
6162
return this._super()
6263
.fail(
6364
function () {
65+
fullScreenLoader.stopLoader();
6466
self.isInAction(false);
6567
document.removeEventListener('click', iframe.stopEventPropagation, true);
6668
}
@@ -71,7 +73,15 @@ define(
7173
* After place order callback
7274
*/
7375
afterPlaceOrder: function () {
76+
if (this.iframeIsLoaded) {
77+
document.getElementById(this.getCode() + '-iframe')
78+
.contentWindow.location.reload();
79+
}
80+
7481
this.paymentReady(true);
82+
this.iframeIsLoaded = true;
83+
this.isPlaceOrderActionAllowed(true);
84+
fullScreenLoader.stopLoader();
7585
},
7686

7787
/**

0 commit comments

Comments
 (0)