diff options
Diffstat (limited to 'src/kyclogic/taler-exchange-kyc-tester.c')
-rw-r--r-- | src/kyclogic/taler-exchange-kyc-tester.c | 48 |
1 files changed, 34 insertions, 14 deletions
diff --git a/src/kyclogic/taler-exchange-kyc-tester.c b/src/kyclogic/taler-exchange-kyc-tester.c index 84324f839..6ae78f5b1 100644 --- a/src/kyclogic/taler-exchange-kyc-tester.c +++ b/src/kyclogic/taler-exchange-kyc-tester.c @@ -459,12 +459,26 @@ webhook_finished_cb ( (void) expiration; (void) provider_section; kwh->wh = NULL; - GNUNET_break (0 == GNUNET_memcmp (account_id, - &cmd_line_h_payto)); - GNUNET_break (0 == strcmp (provider_user_id, - cmd_provider_user_id)); - GNUNET_break (0 == strcmp (provider_legitimization_id, - cmd_provider_legitimization_id)); + if (0 != GNUNET_memcmp (account_id, + &cmd_line_h_payto)) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Received webhook for unexpected account\n"); + } + if (0 != strcmp (provider_user_id, + cmd_provider_user_id)) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Received webhook for unexpected provider user ID (%s)\n", + provider_user_id); + } + if (0 != strcmp (provider_legitimization_id, + cmd_provider_legitimization_id)) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Received webhook for unexpected provider legitimization ID (%s)\n", + provider_legitimization_id); + } switch (status) { case TALER_KYCLOGIC_STATUS_SUCCESS: @@ -568,9 +582,6 @@ handler_kyc_webhook_generic ( { struct KycWebhookContext *kwh = rc->rh_ctx; - json_dumpf (root, - stderr, - JSON_INDENT (2)); if (NULL == kwh) { /* first time */ kwh = GNUNET_new (struct KycWebhookContext); @@ -1363,11 +1374,20 @@ initiate_cb ( GNUNET_SCHEDULER_shutdown (); return; } - fprintf (stdout, - "Visit `%s' to begin KYC process.\nAlso use: taler-exchange-kyc-tester -w -u '%s' -U '%s'\n", - redirect_url, - provider_user_id, - provider_legitimization_id); + { + char *s; + + s = GNUNET_STRINGS_data_to_string_alloc (&cmd_line_h_payto, + sizeof (cmd_line_h_payto)); + + fprintf (stdout, + "Visit `%s' to begin KYC process.\nAlso use: taler-exchange-kyc-tester -w -u '%s' -U '%s' -p %s\n", + redirect_url, + provider_user_id, + provider_legitimization_id, + s); + GNUNET_free (s); + } GNUNET_free (cmd_provider_user_id); GNUNET_free (cmd_provider_legitimization_id); if (NULL != provider_user_id) |