Skip to content

Commit 01e21c1

Browse files
author
Olexii Korshenko
committed
MAGETWO-39505: Update iframe payment method flow
1 parent efba444 commit 01e21c1

File tree

1 file changed

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

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@ define(
2828
* Places order in pending payment status.
2929
*/
3030
placePendingPaymentOrder: function () {
31-
this.placeOrder(false);
32-
this.isInAction(true);
31+
if (this.placeOrder()) {
32+
this.isInAction(true);
33+
// capture all click events
34+
document.addEventListener('click', function(event) {
35+
event.stopImmediatePropagation();
36+
event.preventDefault();
37+
}, true);
38+
}
3339
}
3440
});
3541
}

0 commit comments

Comments
 (0)