summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_pay_order.c
diff options
context:
space:
mode:
authorJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-07-23 20:00:13 -0400
committerJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-07-23 20:00:13 -0400
commit94f8e779a3a8706d5ade4f1871607132acb9e026 (patch)
tree05845de6881a6880e5ee2f45cb0d0d9516a41fbd /src/testing/testing_api_cmd_pay_order.c
parent280b0a6c5aa4917d85b0e480f9e08ce59b4588d9 (diff)
downloadmerchant-94f8e779a3a8706d5ade4f1871607132acb9e026.tar.gz
merchant-94f8e779a3a8706d5ade4f1871607132acb9e026.tar.bz2
merchant-94f8e779a3a8706d5ade4f1871607132acb9e026.zip
test pay with NULL session_id
Diffstat (limited to 'src/testing/testing_api_cmd_pay_order.c')
-rw-r--r--src/testing/testing_api_cmd_pay_order.c12
1 files changed, 10 insertions, 2 deletions
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,