summaryrefslogtreecommitdiff
path: root/src/include/taler_merchant_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-10 20:14:57 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-10 20:14:57 +0200
commit0b945df357bf820540b67b412d47aa9073797267 (patch)
tree4027a8711e7398070f556ae42447c101d91a063e /src/include/taler_merchant_service.h
parent831272d4344151a62d2a8ffc4188d4302f64be5b (diff)
downloadmerchant-0b945df357bf820540b67b412d47aa9073797267.tar.gz
merchant-0b945df357bf820540b67b412d47aa9073797267.tar.bz2
merchant-0b945df357bf820540b67b412d47aa9073797267.zip
implement #5299
Diffstat (limited to 'src/include/taler_merchant_service.h')
-rw-r--r--src/include/taler_merchant_service.h57
1 files changed, 56 insertions, 1 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index ac7e4279..ef616c1d 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -299,15 +299,70 @@ struct TALER_MERCHANT_RefundLookupOperation;
/**
+ * Detail about a refund lookup result.
+ */
+struct TALER_MERCHANT_RefundDetail
+{
+
+ /**
+ * Exchange response details. Full details are only included
+ * upon failure (HTTP status is not #MHD_HTTP_OK).
+ */
+ struct TALER_EXCHANGE_HttpResponse hr;
+
+ /**
+ * Coin this detail is about.
+ */
+ struct TALER_CoinSpendPublicKeyP coin_pub;
+
+ /**
+ * Refund transaction ID used.
+ */
+ uint64_t rtransaction_id;
+
+ /**
+ * Amount to be refunded for this coin.
+ */
+ struct TALER_Amount refund_amount;
+
+ /**
+ * Applicable refund transaction fee.
+ */
+ struct TALER_Amount refund_fee;
+
+ /**
+ * Public key of the exchange affirming the refund,
+ * only valid if the @e hr http_status is #MHD_HTTP_OK.
+ */
+ struct TALER_ExchangePublicKeyP exchange_pub;
+
+ /**
+ * Signature of the exchange affirming the refund,
+ * only valid if the @e hr http_status is #MHD_HTTP_OK.
+ */
+ struct TALER_ExchangeSignatureP exchange_sig;
+
+};
+
+
+/**
* Callback to process a GET /refund request
*
* @param cls closure
* @param hr HTTP response details
+ * @param h_contract_terms hash of the contract terms to which the refund is applied
+ * @param merchant_pub public key of the merchant
+ * @param num_details length of the @a details array
+ * @param details details about the refund processing
*/
typedef void
(*TALER_MERCHANT_RefundLookupCallback) (
void *cls,
- const struct TALER_MERCHANT_HttpResponse *hr);
+ const struct TALER_MERCHANT_HttpResponse *hr,
+ const struct GNUNET_HashCode *h_contract_terms,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ unsigned int num_details,
+ const struct TALER_MERCHANT_RefundDetail *details);
/**