summaryrefslogtreecommitdiff
path: root/src/lib/merchant_api_get_kyc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/merchant_api_get_kyc.c')
-rw-r--r--src/lib/merchant_api_get_kyc.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/lib/merchant_api_get_kyc.c b/src/lib/merchant_api_get_kyc.c
index c394590a..b3008ef6 100644
--- a/src/lib/merchant_api_get_kyc.c
+++ b/src/lib/merchant_api_get_kyc.c
@@ -91,18 +91,17 @@ parse_kyc (struct TALER_MERCHANT_KycGetHandle *kyc,
sizeof (pending_kycs));
for (unsigned int i = 0; i<num_pends; i++)
{
- uint32_t status;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_mark_optional (
- GNUNET_JSON_spec_string ("kyc_url",
+ TALER_JSON_spec_web_url ("kyc_url",
&pending_kycs[i].kyc_url),
NULL),
- GNUNET_JSON_spec_uint32 ("aml_status",
- &status),
- GNUNET_JSON_spec_string ("exchange_url",
+ TALER_JSON_spec_aml_decision ("aml_status",
+ &pending_kycs[i].aml_status),
+ TALER_JSON_spec_web_url ("exchange_url",
&pending_kycs[i].exchange_url),
- GNUNET_JSON_spec_string ("payto_uri",
- &pending_kycs[i].payto_uri),
+ TALER_JSON_spec_payto_uri ("payto_uri",
+ &pending_kycs[i].payto_uri),
GNUNET_JSON_spec_end ()
};
@@ -115,18 +114,15 @@ parse_kyc (struct TALER_MERCHANT_KycGetHandle *kyc,
GNUNET_break (0);
return GNUNET_SYSERR;
}
- pending_kycs[i].aml_status
- = (enum TALER_AmlDecisionState) status;
}
for (unsigned int i = 0; i<num_touts; i++)
{
uint32_t hs;
- uint32_t ec;
struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_string ("exchange_url",
+ TALER_JSON_spec_web_url ("exchange_url",
&timeout_kycs[i].exchange_url),
- GNUNET_JSON_spec_uint32 ("exchange_code",
- &ec),
+ TALER_JSON_spec_ec ("exchange_code",
+ &timeout_kycs[i].exchange_code),
GNUNET_JSON_spec_uint32 ("exchange_http_status",
&hs),
GNUNET_JSON_spec_end ()
@@ -142,7 +138,6 @@ parse_kyc (struct TALER_MERCHANT_KycGetHandle *kyc,
return GNUNET_SYSERR;
}
timeout_kycs[i].exchange_http_status = (unsigned int) hs;
- timeout_kycs[i].exchange_code = (enum TALER_ErrorCode) ec;
}
kr->details.kyc_status.pending_kycs = pending_kycs;
kr->details.kyc_status.timeout_kycs = timeout_kycs;