From 94f8e779a3a8706d5ade4f1871607132acb9e026 Mon Sep 17 00:00:00 2001 From: Jonathan Buchanan Date: Thu, 23 Jul 2020 20:00:13 -0400 Subject: test pay with NULL session_id --- src/testing/testing_api_cmd_pay_order.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/testing/testing_api_cmd_pay_order.c') diff --git a/src/testing/testing_api_cmd_pay_order.c b/src/testing/testing_api_cmd_pay_order.c index dca44377..6848e6a3 100644 --- a/src/testing/testing_api_cmd_pay_order.c +++ b/src/testing/testing_api_cmd_pay_order.c @@ -86,6 +86,11 @@ struct PayState * Signature from the merchant, set on success. */ struct TALER_MerchantSignatureP merchant_sig; + + /** + * The session for which the payment is made. + */ + const char *session_id; }; @@ -357,7 +362,7 @@ pay_run (void *cls, ps->h_contract_terms = *h_proposal; ps->oph = TALER_MERCHANT_order_pay (is->ctx, ps->merchant_url, - "", /* session ID */ + ps->session_id, h_proposal, &total_amount, &max_fee, @@ -487,6 +492,7 @@ pay_traits (void *cls, * @param amount_with_fee amount to pay, including the deposit * fee * @param amount_without_fee amount to pay, no fees included. + * @param session_id the session id to use for the payment (can be NULL). * @return the command */ struct TALER_TESTING_Command @@ -496,7 +502,8 @@ TALER_TESTING_cmd_merchant_pay_order (const char *label, const char *proposal_reference, const char *coin_reference, const char *amount_with_fee, - const char *amount_without_fee) + const char *amount_without_fee, + const char *session_id) { struct PayState *ps; @@ -507,6 +514,7 @@ TALER_TESTING_cmd_merchant_pay_order (const char *label, ps->merchant_url = merchant_url; ps->amount_with_fee = amount_with_fee; ps->amount_without_fee = amount_without_fee; + ps->session_id = session_id; { struct TALER_TESTING_Command cmd = { .cls = ps, -- cgit v1.2.3