Skip to content

Commit ea90441

Browse files
committed
MAGETWO-52107: After clicking "X" sign on billing agreement pop up customer is redirected to PayPal
1 parent 8fce4ae commit ea90441

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

app/code/Magento/Paypal/view/frontend/web/js/paypal-checkout.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,16 @@ define([
5454
* Cancel confirmation handler
5555
*
5656
*/
57-
cancel: function () {
58-
self._redirect(returnUrl);
57+
cancel: function (event) {
58+
if (event && !$(event.target).hasClass('action-close')) {
59+
self._redirect(returnUrl);
60+
}
5961
}
6062
}
6163
});
62-
63-
return false;
64+
} else {
65+
this._redirect(returnUrl, originalForm);
6466
}
65-
66-
this._redirect(returnUrl, originalForm);
67-
6867
}, this));
6968
},
7069

0 commit comments

Comments
 (0)