Skip to content

Commit

Permalink
[ECP-9206] Fix return type in checking adyen orders (#518)
Browse files Browse the repository at this point in the history
* [ECP-9206] Fix return type in checking adyen orders

* [ECP-9206] Return false from catch block in case of error

---------

Co-authored-by: sushmita <[email protected]>
  • Loading branch information
SushmitaThakur and sushmita authored Jul 17, 2024
1 parent 13b5a47 commit 2fc9de1
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ Component.register('adyen-notifications', {
}
},

beforeMount() {
this.showWidget = this.adyenService.isAdyenOrder(this.order);
async beforeMount() {
this.showWidget = await this.adyenService.isAdyenOrder(this.order);
if (this.showWidget) {
this.fetchNotifications();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ Component.register('adyen-partial-payments', {
}
},

beforeMount() {
async beforeMount() {
this.isVersionOlderThan65 = VersionHelper.isVersionOlderThan65();
this.showWidget = this.adyenService.isAdyenOrder(this.order);
this.showWidget = await this.adyenService.isAdyenOrder(this.order);

if (this.showWidget) {
this.fetchAdyenPartialPayments();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ Component.register('adyen-refund', {
},
},

beforeMount() {
this.showWidget = this.adyenService.isAdyenOrder(this.order);
async beforeMount() {
this.showWidget = await this.adyenService.isAdyenOrder(this.order);
if (this.showWidget) {
this.fetchRefunds();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class ApiClient extends ApiService {
})
.catch((error) => {
console.error('An error occurred: ' + error.message);
throw error;
return false;
});
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
.adyen-capture-card-header{display:flex;height:30px;margin-bottom:15px}.adyen-capture-card-header-first{margin-top:auto;width:100%}
.adyen-refund-card-header{display:flex;height:30px;margin-bottom:15px}.adyen-refund-card-header-first{margin-top:auto;width:100%}

/*# sourceMappingURL=adyen-payment-shopware6.css.map*/

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

0 comments on commit 2fc9de1

Please sign in to comment.