Skip to content

Commit 7ba70f2

Browse files
author
Anna Bukatar
committed
ACP2E-2533: Paypal payment shows successful but Paypal API returns 502 Bad Gateway Error
1 parent 827564c commit 7ba70f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ define([
5656
clientConfig.rendererComponent.beforeOnAuthorize(deferred.resolve, deferred.reject, actions)
5757
.then(function () {
5858
$.post(clientConfig.onAuthorizeUrl, params).done(function (res) {
59+
if (res.success === false) {
60+
clientConfig.rendererComponent.catchOnAuthorize(res, deferred.resolve, deferred.reject);
61+
return;
62+
}
5963
clientConfig.rendererComponent
6064
.afterOnAuthorize(res, deferred.resolve, deferred.reject, actions);
6165
customerData.set('paypal-funding-source', '');

0 commit comments

Comments
 (0)