aboutsummaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_helper.c
diff options
context:
space:
mode:
authorpriscilla <priscilla.huang@efrei.net>2023-01-31 09:06:20 -0500
committerpriscilla <priscilla.huang@efrei.net>2023-01-31 09:06:41 -0500
commit3645e148dd673d0f5b72226a9d9a6310cbe21be0 (patch)
tree7287a1c15ff22d559852e596e52eb3943564c990 /src/backend/taler-merchant-httpd_helper.c
parentbf872f712e7af196341a0aacde1c0fd70b046e72 (diff)
backend pending webhook
Diffstat (limited to 'src/backend/taler-merchant-httpd_helper.c')
-rw-r--r--src/backend/taler-merchant-httpd_helper.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/backend/taler-merchant-httpd_helper.c b/src/backend/taler-merchant-httpd_helper.c
index 2cffa20c..b875f6f3 100644
--- a/src/backend/taler-merchant-httpd_helper.c
+++ b/src/backend/taler-merchant-httpd_helper.c
@@ -20,11 +20,12 @@
*/
#include "platform.h"
#include <gnunet/gnunet_util_lib.h>
+#include <gnunet/gnunet_db_lib.h>
#include <taler/taler_util.h>
#include <taler/taler_json_lib.h>
#include "taler-merchant-httpd_helper.h"
#include <taler/taler_templating_lib.h>
-
+#include <taler/taler_dbevents.h>
/**
* check @a payto_uris for well-formedness
@@ -587,6 +588,19 @@ trigger_webhook_cb (void *cls,
http_method,
header,
body);
+ if (t->rv > 0)
+ {
+ struct GNUNET_DB_EventHeaderP es = {
+ .size = htons (sizeof(es)),
+ .type = htons (TALER_DBEVENT_MERCHANT_WEBHOOK_PENDING)
+ };
+ const void *extra = NULL;
+ size_t extra_size = 0;
+ TMH_db->event_notify (TMH_db->cls,
+ &es,
+ &extra,
+ extra_size);
+ }
free (header);
free (body);
}