Skip to content

Commit

Permalink
fix: comparing order status value (#966)
Browse files Browse the repository at this point in the history
  • Loading branch information
amihajlovski committed Sep 20, 2023
1 parent cc63612 commit 5d4d050
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function submit(order) {
try {
Transaction.begin();
// Places the order if not placed yet
if (order.status === Order.ORDER_STATUS_CREATED) {
if (order.status.value === Order.ORDER_STATUS_CREATED) {
// custom fraudDetection
const fraudDetectionStatus = { status: 'success' };
const placeOrderResult = COHelpers.placeOrder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function processNotifications(/* pdict */) {
// Only CREATED orders can be failed
if (
order === null ||
order.status !== dw.order.Order.ORDER_STATUS_CREATED ||
order.status.value !== dw.order.Order.ORDER_STATUS_CREATED ||
handlerResult.RefusedHpp
) {
continue;
Expand Down

0 comments on commit 5d4d050

Please sign in to comment.