expose KYC traits for withdraw/get deposits commands
This commit is contained in:
parent
121bfe3659
commit
659cd4439d
@ -2368,6 +2368,7 @@ TALER_TESTING_get_trait (const struct TALER_TESTING_Trait *traits,
|
|||||||
op (taler_uri, const char *) \
|
op (taler_uri, const char *) \
|
||||||
op (payto_uri, const char *) \
|
op (payto_uri, const char *) \
|
||||||
op (row, const uint64_t) \
|
op (row, const uint64_t) \
|
||||||
|
op (payment_target_uuid, const uint64_t) \
|
||||||
op (array_length, const unsigned int) \
|
op (array_length, const unsigned int) \
|
||||||
op (credit_payto_uri, const char *) \
|
op (credit_payto_uri, const char *) \
|
||||||
op (debit_payto_uri, const char *) \
|
op (debit_payto_uri, const char *) \
|
||||||
|
@ -49,6 +49,12 @@ struct TrackTransactionState
|
|||||||
*/
|
*/
|
||||||
unsigned int expected_response_code;
|
unsigned int expected_response_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to the KYC UUID *if* the exchange replied with
|
||||||
|
* a request for KYC (#MHD_HTTP_ACCEPTED).
|
||||||
|
*/
|
||||||
|
uint64_t kyc_uuid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to any operation that can provide a transaction.
|
* Reference to any operation that can provide a transaction.
|
||||||
* Will be the transaction to track.
|
* Will be the transaction to track.
|
||||||
@ -147,6 +153,7 @@ deposit_wtid_cb (void *cls,
|
|||||||
break;
|
break;
|
||||||
case MHD_HTTP_ACCEPTED:
|
case MHD_HTTP_ACCEPTED:
|
||||||
/* allowed, nothing to check here */
|
/* allowed, nothing to check here */
|
||||||
|
tts->kyc_uuid = dr->details.accepted.payment_target_uuid;
|
||||||
break;
|
break;
|
||||||
case MHD_HTTP_NOT_FOUND:
|
case MHD_HTTP_NOT_FOUND:
|
||||||
/* allowed, nothing to check here */
|
/* allowed, nothing to check here */
|
||||||
@ -306,6 +313,7 @@ track_transaction_traits (void *cls,
|
|||||||
struct TrackTransactionState *tts = cls;
|
struct TrackTransactionState *tts = cls;
|
||||||
struct TALER_TESTING_Trait traits[] = {
|
struct TALER_TESTING_Trait traits[] = {
|
||||||
TALER_TESTING_make_trait_wtid (&tts->wtid),
|
TALER_TESTING_make_trait_wtid (&tts->wtid),
|
||||||
|
TALER_TESTING_make_trait_payment_target_uuid (&tts->kyc_uuid),
|
||||||
TALER_TESTING_trait_end ()
|
TALER_TESTING_trait_end ()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -126,6 +126,12 @@ struct WithdrawState
|
|||||||
*/
|
*/
|
||||||
struct GNUNET_TIME_Relative total_backoff;
|
struct GNUNET_TIME_Relative total_backoff;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to the KYC UUID *if* the exchange replied with
|
||||||
|
* a request for KYC.
|
||||||
|
*/
|
||||||
|
uint64_t kyc_uuid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expected HTTP response code to the request.
|
* Expected HTTP response code to the request.
|
||||||
*/
|
*/
|
||||||
@ -253,7 +259,7 @@ reserve_withdraw_cb (void *cls,
|
|||||||
break;
|
break;
|
||||||
case MHD_HTTP_ACCEPTED:
|
case MHD_HTTP_ACCEPTED:
|
||||||
/* nothing to check */
|
/* nothing to check */
|
||||||
/* TODO: trait for returned uuid! */
|
ws->kyc_uuid = wr->details.accepted.payment_target_uuid;
|
||||||
break;
|
break;
|
||||||
case MHD_HTTP_FORBIDDEN:
|
case MHD_HTTP_FORBIDDEN:
|
||||||
/* nothing to check */
|
/* nothing to check */
|
||||||
@ -287,7 +293,7 @@ reserve_withdraw_cb (void *cls,
|
|||||||
* @param[out] idx where we set $INDEX
|
* @param[out] idx where we set $INDEX
|
||||||
* @return #GNUNET_SYSERR if $INDEX is present but not numeric
|
* @return #GNUNET_SYSERR if $INDEX is present but not numeric
|
||||||
*/
|
*/
|
||||||
static int
|
static enum GNUNET_GenericReturnValue
|
||||||
parse_coin_reference (const char *coin_reference,
|
parse_coin_reference (const char *coin_reference,
|
||||||
char **cref,
|
char **cref,
|
||||||
unsigned int *idx)
|
unsigned int *idx)
|
||||||
@ -528,6 +534,7 @@ withdraw_traits (void *cls,
|
|||||||
TALER_TESTING_make_trait_reserve_priv (reserve_priv),
|
TALER_TESTING_make_trait_reserve_priv (reserve_priv),
|
||||||
TALER_TESTING_make_trait_reserve_pub (reserve_pub),
|
TALER_TESTING_make_trait_reserve_pub (reserve_pub),
|
||||||
TALER_TESTING_make_trait_amount (&ws->amount),
|
TALER_TESTING_make_trait_amount (&ws->amount),
|
||||||
|
TALER_TESTING_make_trait_payment_target_uuid (&ws->kyc_uuid),
|
||||||
TALER_TESTING_make_trait_exchange_url (
|
TALER_TESTING_make_trait_exchange_url (
|
||||||
(const char **) &ws->exchange_url),
|
(const char **) &ws->exchange_url),
|
||||||
TALER_TESTING_trait_end ()
|
TALER_TESTING_trait_end ()
|
||||||
|
Loading…
Reference in New Issue
Block a user