merchant

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

commit 8e104cfe8a419099e36a8c992f5523e2f0852aee
parent ed3003dd83612628effa105a798f376def2fd33b
Author: priscilla <priscilla.huang@efrei.net>
Date:   Wed, 29 Mar 2023 10:09:28 -0400

pull

Diffstat:
Msrc/testing/testing_api_cmd_get_template.c | 32+++++---------------------------
1 file changed, 5 insertions(+), 27 deletions(-)

diff --git a/src/testing/testing_api_cmd_get_template.c b/src/testing/testing_api_cmd_get_template.c @@ -115,48 +115,26 @@ get_template_cb (void *cls, } { const char **expected_pos_key; - const char *pos_key = tgr->details.success.pos_key; if (GNUNET_OK != TALER_TESTING_get_trait_template_pos_key (template_cmd, &expected_pos_key)) TALER_TESTING_interpreter_fail (gis->is); - if ( ( (NULL == pos_key) && (NULL != *expected_pos_key)) || - ( (NULL != pos_key) && (NULL == *expected_pos_key)) || - ( (NULL != pos_key) && - (0 != strcmp (pos_key, + if ( ( (NULL == tgr->details.success.pos_key) && (NULL != *expected_pos_key)) || + ( (NULL != tgr->details.success.pos_key) && (NULL == *expected_pos_key)) || + ( (NULL != tgr->details.success.pos_key) && + (0 != strcmp (tgr->details.success.pos_key, *expected_pos_key)) ) ) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Template pos_key `%s' does not match `%s'\n", - pos_key, + tgr->details.success.pos_key, *expected_pos_key); TALER_TESTING_interpreter_fail (gis->is); return; } } { - const enum TALER_MerchantConfirmationAlgorithm *expected_pos_alg; - const enum TALER_MerchantConfirmationAlgorithm pos_alg = tgr->details.success.pos_alg; - - if (GNUNET_OK != - TALER_TESTING_get_trait_template_pos_alg (template_cmd, - &expected_pos_alg)) - TALER_TESTING_interpreter_fail (gis->is); - if ( ( (0 == pos_alg) && (0 != *expected_pos_alg)) || - ( (0 != pos_alg) && (0 == *expected_pos_alg)) || - ( (0 != pos_alg) && - (pos_alg != *expected_pos_alg)) ) - { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Template pos_alg `%d' does not match `%d'\n", - pos_alg, - *expected_pos_alg); - TALER_TESTING_interpreter_fail (gis->is); - return; - } - } - { const json_t *expected_template_contract; if (GNUNET_OK !=