Skip to content

Commit 00644e8

Browse files
committed
MC-31504: [2.4.0] Update PayPal plugin to use the PayPal JavaScript SDK
- Fixed loading spinner display to work with credit card checkout
1 parent 64b5750 commit 00644e8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/code/Magento/Paypal/view/frontend/web/js/in-context/express-checkout-wrapper.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@ define([
3737
/**
3838
* Execute logic on Paypal button click
3939
*/
40-
onClick: function () {
41-
//display loading widget
42-
$('body').trigger('processStart');
43-
},
40+
onClick: function () {},
4441

4542
/**
4643
* Before payment execute
@@ -63,6 +60,7 @@ define([
6360
* @return {*}
6461
*/
6562
afterPayment: function (res, resolve, reject) {
63+
6664
if (res.success) {
6765
return resolve(res.token);
6866
}
@@ -92,6 +90,9 @@ define([
9290
* @return {jQuery.Deferred}
9391
*/
9492
beforeOnAuthorize: function (resolve, reject, actions) { //eslint-disable-line no-unused-vars
93+
//display loading widget.
94+
$('body').trigger('processStart');
95+
9596
return $.Deferred().resolve();
9697
},
9798

0 commit comments

Comments
 (0)