[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] 05/07: pull
From: |
gnunet |
Subject: |
[taler-merchant] 05/07: pull |
Date: |
Wed, 29 Mar 2023 16:39:52 +0200 |
This is an automated email from the git hooks/post-receive script.
priscilla-huang pushed a commit to branch master
in repository merchant.
commit ed3003dd83612628effa105a798f376def2fd33b
Author: priscilla <priscilla.huang@efrei.net>
AuthorDate: Mon Mar 27 09:43:00 2023 -0400
pull
---
src/testing/testing_api_cmd_pay_order.c | 31 ++++++++++++-------------------
1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/src/testing/testing_api_cmd_pay_order.c
b/src/testing/testing_api_cmd_pay_order.c
index 8077f375..cff679a8 100644
--- a/src/testing/testing_api_cmd_pay_order.c
+++ b/src/testing/testing_api_cmd_pay_order.c
@@ -93,9 +93,18 @@ struct PayState
const char *session_id;
/**
- * This variable is for the verification of the payment.
+ * base64-encoded key
*/
const char *pos_key;
+
+ /**
+ * Option that add amount of the order
+ */
+ enum TALER_MerchantConfirmationAlgorithm pos_alg;
+
+ /**
+ * This variable is for the verification of the payment.
+ */
const char *pos_confirmation;
};
@@ -245,23 +254,6 @@ pay_cb (void *cls,
if (MHD_HTTP_OK == pr->hr.http_status)
{
ps->merchant_sig = pr->details.success.merchant_sig;
- /*
- struct TALER_Amount total_amount;
- const char *pos_key;
- struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_string ("order_id",
- &ps->proposal_reference),
- GNUNET_JSON_spec_string ("pos_key",
- &pos_key),
- TALER_JSON_spec_amount_any ("amount",
- &total_amount),
- GNUNET_JSON_spec_end ()
- };
-
- ps->pos_confirmation = TALER_build_pos_confirmation (pos_key,
-
TALER_MCA_WITHOUT_PRICE,
- &total_amount,
-
GNUNET_TIME_timestamp_get());*/
// FIXME: check if pr->details.success.pos_confirmation;
// for that, get pos_secret from ps->proposal_reference CMD and amount
from pay/order creation cmd using traits
struct TALER_Amount amount_with_fee;
@@ -269,7 +261,7 @@ pay_cb (void *cls,
TALER_string_to_amount (ps->amount_with_fee,
&amount_with_fee));
ps->pos_confirmation = TALER_build_pos_confirmation (ps->pos_key,
-
TALER_MCA_WITHOUT_PRICE,
+ ps->pos_alg,
&amount_with_fee,
GNUNET_TIME_timestamp_get());
ps->pos_confirmation = pr->details.success.pos_confirmation;
@@ -507,6 +499,7 @@ pay_traits (void *cls,
TALER_TESTING_make_trait_merchant_sig (&ps->merchant_sig),
TALER_TESTING_make_trait_amount (&amount_with_fee),
TALER_TESTING_make_trait_template_pos_key (&ps->pos_key),
+ TALER_TESTING_make_trait_template_pos_alg (&ps->pos_alg),
TALER_TESTING_trait_end ()
};
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-merchant] branch master updated (3fa7d3be -> 4e207441), gnunet, 2023/03/29
- [taler-merchant] 02/07: update of the test TOTP but not finish, gnunet, 2023/03/29
- [taler-merchant] 07/07: update pay order / using templates for test case totp, gnunet, 2023/03/29
- [taler-merchant] 03/07: update of the test TOTP but not finish, gnunet, 2023/03/29
- [taler-merchant] 01/07: daily pull, gnunet, 2023/03/29
- [taler-merchant] 05/07: pull,
gnunet <=
- [taler-merchant] 04/07: pull, gnunet, 2023/03/29
- [taler-merchant] 06/07: pull, gnunet, 2023/03/29