From 85e66778e06b4a17a85e29e1659f65647c6541f2 Mon Sep 17 00:00:00 2001 From: Marija Date: Fri, 22 Mar 2024 16:30:01 +0100 Subject: [PATCH] Fix check if payment is created CS-5248 --- notification/src/handler/notification/notification.handler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notification/src/handler/notification/notification.handler.js b/notification/src/handler/notification/notification.handler.js index 311cfd469..72302a93d 100644 --- a/notification/src/handler/notification/notification.handler.js +++ b/notification/src/handler/notification/notification.handler.js @@ -56,8 +56,8 @@ async function processNotification( ) if ( - !payment.custom.fields.makePaymentResponse && - !payment.custom.fields.createSessionResponse + !payment?.custom.fields.makePaymentResponse && + !payment?.custom.fields.createSessionResponse ) { const error = new Error(`Payment ${merchantReference} is not created yet.`) error.statusCode = 503