diff options
Diffstat (limited to 'src/exchange/taler-exchange-httpd_purses_merge.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_purses_merge.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_purses_merge.c b/src/exchange/taler-exchange-httpd_purses_merge.c index b0055edab..14dba5232 100644 --- a/src/exchange/taler-exchange-httpd_purses_merge.c +++ b/src/exchange/taler-exchange-httpd_purses_merge.c @@ -223,6 +223,8 @@ merge_transaction (void *cls, bool in_conflict = true; bool no_balance = true; bool no_partner = true; + bool no_kyc = true; + bool no_reserve = true; // FIXME: add KYC-check logic! qs = TEH_plugin->do_purse_merge (TEH_plugin->cls, @@ -234,6 +236,8 @@ merge_transaction (void *cls, &pcc->reserve_pub, &no_partner, &no_balance, + &no_reserve, + &no_kyc, &in_conflict); if (qs < 0) { @@ -257,6 +261,25 @@ merge_transaction (void *cls, pcc->provider_url); return GNUNET_DB_STATUS_HARD_ERROR; } + if (no_reserve) + { + *mhd_ret = + TALER_MHD_reply_with_error (connection, + MHD_HTTP_NOT_FOUND, + TALER_EC_EXCHANGE_GENERIC_RESERVE_UNKNOWN, + NULL); + return GNUNET_DB_STATUS_HARD_ERROR; + } + if (no_kyc) + { + *mhd_ret + = TALER_MHD_REPLY_JSON_PACK ( + connection, + MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS, + TALER_JSON_pack_ec ( + TALER_EC_EXCHANGE_GENERIC_KYC_REQUIRED)); + return GNUNET_DB_STATUS_HARD_ERROR; + } if (no_balance) { *mhd_ret = |