diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-02-01 13:09:06 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-02-01 13:09:13 +0100 |
commit | db448ff4ecf78e4568cd9f37d20ba8e691efe9b8 (patch) | |
tree | 4518bb3924b3b6c47fe367a8f9233b1d81efd768 /src/include/taler_merchant_service.h | |
parent | ad966ab422bba81956d89f1918624b23df7deb52 (diff) | |
download | merchant-db448ff4ecf78e4568cd9f37d20ba8e691efe9b8.tar.gz merchant-db448ff4ecf78e4568cd9f37d20ba8e691efe9b8.tar.bz2 merchant-db448ff4ecf78e4568cd9f37d20ba8e691efe9b8.zip |
add next_url to GET tip response (#7655)
Diffstat (limited to 'src/include/taler_merchant_service.h')
-rw-r--r-- | src/include/taler_merchant_service.h | 57 |
1 files changed, 48 insertions, 9 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h index e413a7c6..8237b47a 100644 --- a/src/include/taler_merchant_service.h +++ b/src/include/taler_merchant_service.h @@ -3442,24 +3442,63 @@ TALER_MERCHANT_reserve_delete_cancel ( */ struct TALER_MERCHANT_TipWalletGetHandle; +/** + * Response to a wallet's GET /tips/$TIP_ID request. + */ +struct TALER_MERCHANT_TipWalletGetResponse +{ + /** + * HTTP response details + */ + struct TALER_MERCHANT_HttpResponse hr; + + /** + * Details depending on the HTTP status code. + */ + union + { + + /** + * Details for #MHD_HTTP_OK status. + */ + struct + { + + /** + * when the tip will expire + */ + struct GNUNET_TIME_Timestamp expiration; + + /** + * exchange from which the coins should be withdrawn + */ + const char *exchange_url; + + /** + * URL where the wallet should navigate after withdrawing the tip. + */ + const char *next_url; + + /** + * total amount still available for the tip + */ + struct TALER_Amount amount_remaining; + } success; + + } details; +}; + /** * Callback to process a GET /tips/$TIP_ID request * * @param cls closure - * @param hr HTTP response details - * @param expiration when the tip will expire - * @param exchange_url exchange from which the coins should be withdrawn - * @param amount_remaining total amount still available for the tip + * @param wgr response details */ typedef void (*TALER_MERCHANT_TipWalletGetCallback) ( void *cls, - const struct TALER_MERCHANT_HttpResponse *hr, - struct GNUNET_TIME_Timestamp expiration, - const char *exchange_url, - const struct TALER_Amount *amount_remaining); - + const struct TALER_MERCHANT_TipWalletGetResponse *wgr); /** * Issue a GET /tips/$TIP_ID (public variant) request to the backend. Returns |