merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 5d576504c45047fd8cd24dd5fc52d9e145695da1
parent 11d161bf3e688739407364900dbd6dca6f1dade8
Author: priscilla <priscilla.huang@efrei.net>
Date:   Tue,  3 Jan 2023 07:35:28 -0500

update

Diffstat:
Msrc/backenddb/merchant-0004.sql | 21+++------------------
Msrc/lib/merchant_api_common.c | 5+++--
Msrc/testing/testing_api_cmd_post_using_templates.c | 1-
3 files changed, 6 insertions(+), 21 deletions(-)

diff --git a/src/backenddb/merchant-0004.sql b/src/backenddb/merchant-0004.sql @@ -46,22 +46,7 @@ COMMENT ON COLUMN merchant_template.image IS 'NOT NULL, but can be 0 bytes; must contain an ImageDataUrl'; COMMENT ON COLUMN merchant_template.template_contract IS 'The template contract will contains some additional information.'; - -/* -CREATE TABLE IF NOT EXISTS merchant_using_template - (template_serial BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY - ,merchant_serial BIGINT NOT NULL - REFERENCES merchant_instances (nerchant_serial) ON DELETE CASCADE - ,summary VERCHAR NOT - ,amount_val INT8 NOT NULL - ,amount_frac INT4 NOT NULL - ,UNIQUE (merchant_serial, template_id) - COMMENT ON TABLE merchant_using_template - IS 'template used by the curstomer (may be incomplete, frontend can override)'; - COMMENT ON COLUMN merchant_usign_template.summary - IS 'Human-readable summary'; -COMMENT ON COLUMN merchant_using_template.amount_val - IS 'Overall amoount that need to pay';*/ + CREATE TABLE IF NOT EXISTS merchant_webhook (webhook_serial BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY @@ -99,8 +84,8 @@ CREATE TABLE IF NOT EXISTS merchant_pending_webhooks ,next_attempt INT8 NOT NULL DEFAULT(0) ,url VARCHAR NOT NULL ,http_method VARCHAR NOT NULL - ,header VARCHAR - ,body VARCHAR + ,header VARCHAR + ,body VARCHAR ,UNIQUE (merchant_serial, webhook_pending_serial) ); COMMENT ON TABLE merchant_pending_webhooks diff --git a/src/lib/merchant_api_common.c b/src/lib/merchant_api_common.c @@ -378,9 +378,10 @@ TALER_MERCHANT_parse_refund_uri_free ( * Function called when we're done processing the * HTTP POST /using-template request to create an order. * - * @param cls the `struct TALER_MERCHANT_PostOrdersHandle or TALER_MERCHANT_UsingTemplatesPostHandle` + * @param cb_cls closure + * @param cb callback * @param response_code HTTP response code, 0 on error - * @param response response body, NULL if not JSON + * @param json for reply */ void TALER_MERCHANT_handle_post_using_templates_create_order (void *cb_cls, diff --git a/src/testing/testing_api_cmd_post_using_templates.c b/src/testing/testing_api_cmd_post_using_templates.c @@ -97,7 +97,6 @@ post_using_templates_cb (void *cls, switch (hr->http_status) { case MHD_HTTP_OK: - // FIXME: check reply! break; case MHD_HTTP_CONFLICT: break;