diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2022-03-15 18:19:08 +0100 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2022-03-15 18:19:08 +0100 |
commit | cd0b3436e9a0d89d427e3dda59d28c03b6d4dd2c (patch) | |
tree | 3531f246991a848670278b1853a8758610aadaf0 /src/testing/testing_api_cmd_pay_order.c | |
parent | c24d0e772552b2c1dbc043ef759445805793e51e (diff) | |
download | merchant-cd0b3436e9a0d89d427e3dda59d28c03b6d4dd2c.tar.gz merchant-cd0b3436e9a0d89d427e3dda59d28c03b6d4dd2c.tar.bz2 merchant-cd0b3436e9a0d89d427e3dda59d28c03b6d4dd2c.zip |
[age restriction] age verification implemented, but not tested.
order/pay now verifies the minimum_age of an order for each coin, using
the age restriction API from the exchange-lib.
Note, tests are not implemented yet.
Diffstat (limited to 'src/testing/testing_api_cmd_pay_order.c')
-rw-r--r-- | src/testing/testing_api_cmd_pay_order.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testing/testing_api_cmd_pay_order.c b/src/testing/testing_api_cmd_pay_order.c index dbc8d6da..be2649c0 100644 --- a/src/testing/testing_api_cmd_pay_order.c +++ b/src/testing/testing_api_cmd_pay_order.c @@ -165,6 +165,7 @@ build_coins (struct TALER_MERCHANT_PayCoin **pc, const struct TALER_DenominationSignature *denom_sig; const struct TALER_Amount *denom_value; const struct TALER_EXCHANGE_DenomPublicKey *denom_pub; + const struct TALER_AgeCommitmentHash *h_age_commitment; GNUNET_assert (GNUNET_OK == TALER_TESTING_get_trait_coin_priv (coin_cmd, @@ -181,11 +182,16 @@ build_coins (struct TALER_MERCHANT_PayCoin **pc, GNUNET_assert (GNUNET_OK == TALER_TESTING_get_trait_amount (coin_cmd, &denom_value)); + GNUNET_assert (GNUNET_OK == + TALER_TESTING_get_trait_h_age_commitment (coin_cmd, + 0, + &h_age_commitment)); icoin->coin_priv = *coin_priv; icoin->denom_pub = denom_pub->key; icoin->denom_sig = *denom_sig; icoin->denom_value = *denom_value; icoin->amount_with_fee = *denom_value; + icoin->h_age_commitment = h_age_commitment; } GNUNET_assert (NULL != (dpk = TALER_TESTING_find_pk (is->keys, @@ -303,6 +309,8 @@ pay_run (void *cls, &total_amount), TALER_JSON_spec_amount_any ("max_fee", &max_fee), + /* FIXME oec + * add minimum age */ GNUNET_JSON_spec_end () }; |