diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-10 23:21:11 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-10 23:21:11 +0200 |
commit | 6d978efe14aa90564ce9257a23bcb2854ba07036 (patch) | |
tree | 40d7e0fbf22d9364c5809f46debfe9a977146cb4 /src/lib/merchant_api_poll_payment.c | |
parent | c22eb34d925c55e1a07710c6f0e8df5b954dece7 (diff) | |
download | merchant-6d978efe14aa90564ce9257a23bcb2854ba07036.tar.gz merchant-6d978efe14aa90564ce9257a23bcb2854ba07036.tar.bz2 merchant-6d978efe14aa90564ce9257a23bcb2854ba07036.zip |
implementing long-polling for refunds (#5985)
Diffstat (limited to 'src/lib/merchant_api_poll_payment.c')
-rw-r--r-- | src/lib/merchant_api_poll_payment.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/merchant_api_poll_payment.c b/src/lib/merchant_api_poll_payment.c index bef2aac8..6b0190af 100644 --- a/src/lib/merchant_api_poll_payment.c +++ b/src/lib/merchant_api_poll_payment.c @@ -205,6 +205,9 @@ handle_poll_payment_finished (void *cls, * before generating an unpaid response). Note that this is just provided to * the server, we as client will block until the response comes back or until * #TALER_MERCHANT_poll_payment_cancel() is called. + * @param min_refund long poll for the service to approve a refund exceeding this value; + * use NULL to not wait for any refund (only for payment). Only makes sense + * with a non-zero @a timeout. * @param poll_payment_cb callback which will work the response gotten from the backend * @param poll_payment_cb_cls closure to pass to @a poll_payment_cb * @return handle for this operation, NULL upon errors @@ -217,6 +220,7 @@ TALER_MERCHANT_poll_payment ( const struct GNUNET_HashCode *h_contract, const char *session_id, struct GNUNET_TIME_Relative timeout, + const struct TALER_Amount *min_refund, TALER_MERCHANT_PollPaymentCallback poll_payment_cb, void *poll_payment_cb_cls) { @@ -253,6 +257,9 @@ TALER_MERCHANT_poll_payment ( "h_contract", h_contract_s, (0 != ts) ? "timeout" : NULL, timeout_s, + (NULL != min_refund) ? "refund" : NULL, + (NULL != min_refund) ? TALER_amount2s ( + min_refund) : NULL, NULL); GNUNET_free (h_contract_s); GNUNET_free (timeout_s); |