aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_merchant_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-05-02 23:24:22 +0200
committerChristian Grothoff <christian@grothoff.org>2020-05-02 23:24:22 +0200
commit35623b7bc44210bc55a429a4f81b1194bb798034 (patch)
tree15659bbdf23c4db6547730fdaac7da594f221be3 /src/include/taler_merchant_service.h
parent9e90a4432b414382344ea525a34af27e661523f4 (diff)
downloadmerchant-35623b7bc44210bc55a429a4f81b1194bb798034.tar.gz
merchant-35623b7bc44210bc55a429a4f81b1194bb798034.tar.bz2
merchant-35623b7bc44210bc55a429a4f81b1194bb798034.zip
implement abort client lib
Diffstat (limited to 'src/include/taler_merchant_service.h')
-rw-r--r--src/include/taler_merchant_service.h55
1 files changed, 34 insertions, 21 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index 5037201d..d32d507b 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -1657,6 +1657,11 @@ struct TALER_MERCHANT_AbortedCoin
*/
struct TALER_ExchangePublicKeyP exchange_pub;
+ /**
+ * Refund fee charged by the exchange. The API will have checked the
+ * signature, but NOT that this is the expected fee.
+ */
+ struct TALER_Amount refund_fee;
};
@@ -1680,6 +1685,29 @@ typedef void
/**
+ * Information we need from the wallet for each coin when aborting.
+ */
+struct TALER_MERCHANT_AbortCoin
+{
+
+ /**
+ * Coin's public key.
+ */
+ struct TALER_CoinSpendPublicKeyP coin_pub;
+
+ /**
+ * Amount this coin contributes to (including fee).
+ */
+ struct TALER_Amount amount_with_fee;
+
+ /**
+ * URL of the exchange that issued @e coin_priv.
+ */
+ const char *exchange_url;
+
+};
+
+/**
* Run a payment abort operation, asking for the payment to be aborted,
* yieldingrefunds for coins that were previously spend on a payment that
* failed to go through.
@@ -1688,38 +1716,23 @@ typedef void
*
* @param ctx execution context
* @param merchant_url base URL of the merchant
- * @param h_wire hash of the merchant’s account details
+ * @param order_id order to abort
* @param h_contract hash of the contact of the merchant with the customer
- * @param transaction_id transaction id for the transaction between merchant and customer
- * @param amount total value of the contract to be paid to the merchant
- * @param max_fee maximum fee covered by the merchant (according to the contract)
* @param merchant_pub the public key of the merchant (used to identify the merchant for refund requests)
- * @param merchant_sig signature from the merchant over the original contract
- * @param timestamp timestamp when the contract was finalized, must match approximately the current time of the merchant
- * @param refund_deadline date until which the merchant can issue a refund to the customer via the merchant (can be zero if refunds are not allowed)
- * @param pay_deadline maximum time limit to pay for this contract
* @param num_coins number of coins used to pay
* @param coins array of coins we use to pay
- * @param coin_sig the signature made with purpose #TALER_SIGNATURE_WALLET_COIN_DEPOSIT made by the customer with the coin’s private key.
- * @param payref_cb the callback to call when a reply for this request is available
- * @param payref_cb_cls closure for @a pay_cb
+ * @param cb the callback to call when a reply for this request is available
+ * @param cb_cls closure for @a cb
* @return a handle for this request
*/
struct TALER_MERCHANT_OrderAbortHandle *
TALER_MERCHANT_order_abort (struct GNUNET_CURL_Context *ctx,
const char *merchant_url,
- const struct GNUNET_HashCode *h_contract,
- const struct TALER_Amount *amount,
- const struct TALER_Amount *max_fee,
- const struct TALER_MerchantPublicKeyP *merchant_pub,
- const struct TALER_MerchantSignatureP *merchant_sig,
- struct GNUNET_TIME_Absolute timestamp,
- struct GNUNET_TIME_Absolute refund_deadline,
- struct GNUNET_TIME_Absolute pay_deadline,
- const struct GNUNET_HashCode *h_wire,
const char *order_id,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ const struct GNUNET_HashCode *h_contract,
unsigned int num_coins,
- const struct TALER_MERCHANT_PayCoin coins[],
+ const struct TALER_MERCHANT_AbortCoin coins[],
TALER_MERCHANT_AbortCallback cb,
void *cb_cls);