commit 384b0265f761315eeed000577da8b47d01d94eec
parent 3648c03507664f8afb77f57a9b235cd3e44ed1c7
Author: bohdan-potuzhnyi <bohdan.potuzhnyi@gmail.com>
Date: Wed, 4 Dec 2024 20:30:07 +0100
small fix
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/backenddb/pg_insert_transfer_details.sql b/src/backenddb/pg_insert_transfer_details.sql
@@ -229,7 +229,7 @@ LOOP
FROM merchant_contract_terms
WHERE order_serial=my_affected_orders.order_serial;
- -- Insert pending webhook
+ -- Insert pending webhook if it exists
INSERT INTO merchant_pending_webhooks
(merchant_serial
,webhook_serial
@@ -240,7 +240,7 @@ LOOP
,mw.webhook_serial
,mw.url
,mw.http_method
- ,json_build_object('order_id', my_order_id)::TEXT
+ ,replace_placeholder(mw.body_template, 'order_id', my_order_id)::TEXT
FROM merchant_webhook mw
WHERE mw.event_type = 'order_settled'
AND mw.merchant_serial = my_merchant_serial;