gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant] branch master updated: Update


From: gnunet
Subject: [taler-merchant] branch master updated: Update
Date: Thu, 24 Nov 2022 16:32:06 +0100

This is an automated email from the git hooks/post-receive script.

priscilla-huang pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 6874f458 Update
6874f458 is described below

commit 6874f45896dfe00d5106c69fa9312cbac216899a
Author: priscilla <priscilla.huang@efrei.net>
AuthorDate: Thu Nov 24 10:31:49 2022 -0500

    Update
---
 src/backenddb/merchant-0004.sql                | 33 ++++++++++++++++++++++++++
 src/testing/test_merchant_product_creation.sh  |  3 ++-
 src/testing/test_merchant_template_creation.sh |  0
 3 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/src/backenddb/merchant-0004.sql b/src/backenddb/merchant-0004.sql
index 0e8428ca..0b2cc349 100644
--- a/src/backenddb/merchant-0004.sql
+++ b/src/backenddb/merchant-0004.sql
@@ -48,3 +48,36 @@ COMMENT ON COLUMN merchant_template.template_contract
   IS 'The template contract will contains some additional information.';
 
 COMMIT;
+
+
+CREATE TABLE IF NOT EXISTS merchant_webhooks
+  (webhooks_serial BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
+  ,merchant_serial BIGINT NOT NULL
+    REFERENCES merchant_instances (merchant_serial) ON DELETE CASCADE
+  ,webhooks_id VARCHAR NOT NULL
+  ,event_type VARCHAR NOT NULL
+  ,url VARCHAR NOT NULL
+  ,methods VARCHAR NOT NULL
+  ,header_template VARCHAR NOT NULL -- in JSON format
+  ,body_template VARCHAR NOT NULL -- in JSON format
+  ,merchant_instance VARCHAR NOT NULL
+  ,UNIQUE (merchant_serial, webhooks_id)
+  );
+COMMENT ON TABLE merchant_webhooks
+  IS 'webhooks used by the merchant (may be incomplete, frontend can 
override)';
+COMMENT ON COLUMN merchant_webhooks.event_type
+  IS 'Event of the webhooks';
+COMMENT ON COLUMN merchant_webhooks.url
+  IS 'URL use by the customer';
+COMMENT ON COLUMN merchant_webhooks.methods
+  IS 'Methods use by the merchant';
+COMMENT ON COLUMN merchant_webhooks.header_template
+  IS 'Header of the webhooks';
+COMMENT ON COLUMN merchant_webhooks.body_template
+  IS 'Body of the webhooks';
+COMMENT ON COLUMN merchant_webhooks.merchant_instance
+  IS 'Information of the merchant';
+
+COMMIT;
+
+
diff --git a/src/testing/test_merchant_product_creation.sh 
b/src/testing/test_merchant_product_creation.sh
index 9b109f0f..246efd33 100755
--- a/src/testing/test_merchant_product_creation.sh
+++ b/src/testing/test_merchant_product_creation.sh
@@ -24,7 +24,8 @@ FORTYTHREE=`get_payto_uri fortythree x`
 STATUS=$(curl -H "Content-Type: application/json" -X POST \
     -H 'Authorization: Bearer secret-token:super_secret' \
     http://localhost:9966/management/instances \
-    -d 
'{"auth":{"method":"external"},"payto_uris":["'$FORTYTHREE'"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1",
 
"default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us"
 : 50000000},"default_pay_delay":{"d_us": 60000000}}' \
+    -d 
'{"auth":{"method":"external"},"payto_uris":["'$FORTYTHREE'"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS
+:1", 
"default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us"
 : 50000000},"default_pay_delay":{"d_us": 60000000}}' \
     -w "%{http_code}" -s -o /dev/null)
 
 if [ "$STATUS" != "204" ]
diff --git a/src/testing/test_merchant_template_creation.sh 
b/src/testing/test_merchant_template_creation.sh
new file mode 100644
index 00000000..e69de29b

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]