aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_patch_template.c
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2023-09-01 14:27:48 +0200
committerChristian Grothoff <grothoff@gnunet.org>2023-09-01 14:27:48 +0200
commit35dcd4514a93ba0f5353ecd1194fc9b515f2aad4 (patch)
tree399d8f8fbebf5e8ac383fc318b7be08901279a31 /src/testing/testing_api_cmd_patch_template.c
parent858e3047b8b595ab693e16ce0bbe0b8983b072ed (diff)
new CRUD APIs for OTP devices and merchant accounts (fixes #7929, #7824), one minor test is still failing...
Diffstat (limited to 'src/testing/testing_api_cmd_patch_template.c')
-rw-r--r--src/testing/testing_api_cmd_patch_template.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/testing/testing_api_cmd_patch_template.c b/src/testing/testing_api_cmd_patch_template.c
index caf3bf23..8ad9d9dc 100644
--- a/src/testing/testing_api_cmd_patch_template.c
+++ b/src/testing/testing_api_cmd_patch_template.c
@@ -60,14 +60,9 @@ struct PatchTemplateState
const char *template_description;
/**
- * base64-encoded key
+ * OTP device ID
*/
- char *pos_key;
-
- /**
- * Option that add amount of the order
- */
- enum TALER_MerchantConfirmationAlgorithm pos_alg;
+ char *otp_id;
/**
* Contract of the company
@@ -147,8 +142,7 @@ patch_template_run (void *cls,
pis->merchant_url,
pis->template_id,
pis->template_description,
- pis->pos_key,
- pis->pos_alg,
+ pis->otp_id,
pis->template_contract,
&patch_template_cb,
pis);
@@ -175,8 +169,7 @@ patch_template_traits (void *cls,
struct PatchTemplateState *pts = cls;
struct TALER_TESTING_Trait traits[] = {
TALER_TESTING_make_trait_template_description (pts->template_description),
- TALER_TESTING_make_trait_template_pos_key (pts->pos_key),
- TALER_TESTING_make_trait_template_pos_alg (&pts->pos_alg),
+ TALER_TESTING_make_trait_otp_id (pts->otp_id),
TALER_TESTING_make_trait_template_contract (pts->template_contract),
TALER_TESTING_make_trait_template_id (pts->template_id),
TALER_TESTING_trait_end (),
@@ -208,7 +201,7 @@ patch_template_cleanup (void *cls,
"PATCH /templates/$ID operation did not complete\n");
TALER_MERCHANT_template_patch_cancel (pis->iph);
}
- GNUNET_free (pis->pos_key);
+ GNUNET_free (pis->otp_id);
json_decref (pis->template_contract);
GNUNET_free (pis);
}
@@ -220,8 +213,7 @@ TALER_TESTING_cmd_merchant_patch_template (
const char *merchant_url,
const char *template_id,
const char *template_description,
- const char *pos_key,
- const enum TALER_MerchantConfirmationAlgorithm pos_alg,
+ const char *otp_id,
json_t *template_contract,
unsigned int http_status)
{
@@ -232,8 +224,7 @@ TALER_TESTING_cmd_merchant_patch_template (
pis->template_id = template_id;
pis->http_status = http_status;
pis->template_description = template_description;
- pis->pos_key = (NULL == pos_key) ? NULL : GNUNET_strdup (pos_key);
- pis->pos_alg = pos_alg;
+ pis->otp_id = (NULL == otp_id) ? NULL : GNUNET_strdup (otp_id);
pis->template_contract = template_contract; /* ownership taken */
{
struct TALER_TESTING_Command cmd = {