From aa904b9455f52050875fba6d0cc89317f060b102 Mon Sep 17 00:00:00 2001
From: Adhidarma Hadiwinoto <me@adhisimon.org>
Date: Sun, 4 Aug 2024 23:51:37 +0700
Subject: [PATCH] More log on webhook sender

---
 lib/core-callback/sender.js | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/core-callback/sender.js b/lib/core-callback/sender.js
index 0cb9488..49b52be 100644
--- a/lib/core-callback/sender.js
+++ b/lib/core-callback/sender.js
@@ -188,8 +188,11 @@ const sender = async (data, xid, retry) => {
                     xid,
                     webhookType,
                     partner: config.listener.partner.webhook,
-                    trxId: data.trx_id,
+                    trxId: data.transaction_id && data.transaction_id.toString(),
                     request_id: data.request_id && data.request_id.toString(),
+                    product_name: data.product_name,
+                    destination: data.destination,
+                    rc: data.rc,
                 });
 
                 axios.post(config.listener.partner.webhook, {
@@ -201,8 +204,11 @@ const sender = async (data, xid, retry) => {
                     xid,
                     webhookType,
                     partner: config.listener.partner.webhook,
-                    trxId: data.trx_id,
+                    trxId: data.transaction_id && data.transaction_id.toString(),
                     request_id: data.request_id && data.request_id.toString(),
+                    product_name: data.product_name,
+                    destination: data.destination,
+                    rc: data.rc,
                 });
             } catch (e) {
                 logger.warn(`${MODULE_NAME} F722520A: Exception on calling webhook`, {
-- 
1.9.0