summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_pay_order.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_cmd_pay_order.c')
-rw-r--r--src/testing/testing_api_cmd_pay_order.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testing/testing_api_cmd_pay_order.c b/src/testing/testing_api_cmd_pay_order.c
index c1c5fc5a..8077f375 100644
--- a/src/testing/testing_api_cmd_pay_order.c
+++ b/src/testing/testing_api_cmd_pay_order.c
@@ -95,6 +95,7 @@ struct PayState
/**
* This variable is for the verification of the payment.
*/
+ const char *pos_key;
const char *pos_confirmation;
};
@@ -263,6 +264,15 @@ pay_cb (void *cls,
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;
+ GNUNET_assert (GNUNET_OK ==
+ 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,
+ &amount_with_fee,
+ GNUNET_TIME_timestamp_get());
+ ps->pos_confirmation = pr->details.success.pos_confirmation;
}
TALER_TESTING_interpreter_next (ps->is);
}
@@ -496,6 +506,7 @@ pay_traits (void *cls,
TALER_TESTING_make_trait_merchant_pub (merchant_pub),
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_trait_end ()
};