Skip to content

Commit

Permalink
improved error handling when using paypal payment (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
kfalkowski11 authored Mar 25, 2024
1 parent 1ca281f commit 532dda0
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@
if (!this.iframeWindow) {
return false;
}

const clearAction = {actionType: 'PIGI_CLEAR_ERROR_MESSAGES'};
this.iframeWindow.postMessage(clearAction, '*');

if (!this.paymentType) {
const clearAction = {actionType: 'PIGI_CLEAR_ERROR_MESSAGES'};
this.iframeWindow.postMessage(clearAction, '*');
this.refreshAndAddPayment();
return false;
}
Expand Down Expand Up @@ -189,7 +191,7 @@
break;
case 'PIGI_ADD_PAYMENT':
this.messageContainer.errorMessages([]);
loader.stopLoader();
loader.stopLoader(true);
if (!data.payload.success) {
this.paymentType = null;
return;
Expand Down

0 comments on commit 532dda0

Please sign in to comment.