merchant

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

commit 652de42caba601d0cab7264909f78ec483af4d9d
parent 8bc99e1fdcacade9f29fa0b4c44418817f4e5c80
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 30 Nov 2019 00:10:55 +0100

more traits

Diffstat:
Msrc/lib/testing_api_cmd_proposal_lookup.c | 33++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/src/lib/testing_api_cmd_proposal_lookup.c b/src/lib/testing_api_cmd_proposal_lookup.c @@ -50,11 +50,21 @@ struct ProposalLookupState json_t *contract_terms; /** - * Hash over the contract terms. + * Hash over the contract terms. Only set if we got #MHD_HTTP_OK. */ struct GNUNET_HashCode contract_terms_hash; /** + * Signature of the merchant. Only set if we got #MHD_HTTP_OK. + */ + struct TALER_MerchantSignatureP merchant_sig; + + /** + * Public key of the merchant. Only set if we got #MHD_HTTP_OK. + */ + struct TALER_MerchantPublicKeyP merchant_pub; + + /** * Expected status code. */ unsigned int http_status; @@ -141,6 +151,23 @@ proposal_lookup_cb (void *cls, TALER_TESTING_FAIL (pls->is); json_incref (pls->contract_terms); pls->contract_terms_hash = *hash; + pls->merchant_sig = *sig; + { + const char *error_name; + unsigned int error_line; + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_fixed_auto ("merchant_pub", + &pls->merchant_pub), + GNUNET_JSON_spec_end () + }; + + if (GNUNET_OK != + GNUNET_JSON_parse (contract_terms, + spec, + &error_name, + &error_line)) + TALER_TESTING_FAIL (pls->is); + } } TALER_TESTING_interpreter_next (pls->is); } @@ -225,6 +252,10 @@ proposal_lookup_traits (void *cls, pls->contract_terms), TALER_TESTING_make_trait_h_contract_terms (0, &pls->contract_terms_hash), + TALER_TESTING_make_trait_merchant_sig (0, + &pls->merchant_sig), + TALER_TESTING_make_trait_peer_key_pub (0, + &pls->merchant_pub.eddsa_pub), TALER_TESTING_trait_end () };