Skip to content

Commit

Permalink
[ECP-8907] - Allow passing optional quoteId while fetching order paym…
Browse files Browse the repository at this point in the history
…ent status (#2462)

* [ECP-8907] - Fix quoteId on productV

* [ECP-8907] Use nullish coalescing operator

---------

Co-authored-by: Can Demiralp <ecandemiralp@gmail.com>
  • Loading branch information
raoulritter and candemiralp authored Jan 25, 2024
1 parent cc88740 commit 2b35d60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions view/frontend/web/js/model/adyen-payment-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ define(
this.connectedTerminals(connectedTerminals);
},

getOrderPaymentStatus: function(orderId) {
getOrderPaymentStatus: function(orderId, quoteId = null) {
let serviceUrl;

if (customer.isLoggedIn()) {
serviceUrl = urlBuilder.createUrl('/adyen/orders/carts/mine/payment-status', {});
} else {
serviceUrl = urlBuilder.createUrl('/adyen/orders/guest-carts/:cartId/payment-status', {
cartId: quote.getQuoteId()
cartId: quoteId ?? quote.getQuoteId()
});
}

Expand Down

0 comments on commit 2b35d60

Please sign in to comment.