commit 71d4d4ced10dbb995bb28605e60ffbda68be88a3
parent 3b2b43cbab432fd5609f57f38e97699f01df21e3
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date: Wed, 5 Jul 2017 09:38:50 +0200
moving definitions to header file
Diffstat:
2 files changed, 22 insertions(+), 25 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_refund.c b/src/backend/taler-merchant-httpd_refund.c
@@ -25,9 +25,7 @@
#include "taler-merchant-httpd.h"
#include "taler-merchant-httpd_parsing.h"
#include "taler-merchant-httpd_responses.h"
-
-#define REFUND_CONFIRMATION 0
-
+#include "taler-merchant-httpd_refund.h"
/**
* How often do we retry the non-trivial refund INSERT database
@@ -35,27 +33,6 @@
*/
#define MAX_RETRIES 5
-
-/**
- * We confirm with a signature that the refund has been successfully
- * done. Even though the frontend doesn't usually do crypto, this signature
- * may turn useful in court.
- */
-struct RefundConfirmationP
-{
-
- /**
- * Purpose is simply set to zero, see macro REFUND_CONFIRMATION above
- */
- struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
-
- /**
- * Hashing the order id, as frontends don't handle contract terms
- */
- struct GNUNET_HashCode h_order_id GNUNET_PACKED;
-
-};
-
struct ProcessRefundData
{
/**
@@ -286,7 +263,7 @@ MH_handler_refund_increase (struct TMH_RequestHandler *rh,
json_decref (root);
GNUNET_JSON_parse_free (spec);
- confirmation.purpose.purpose = REFUND_CONFIRMATION;
+ confirmation.purpose.purpose = TALER_SIGNATURE_MERCHANT_REFUND_OK;
confirmation.purpose.size = htonl (sizeof (struct RefundConfirmationP));
if (GNUNET_OK !=
diff --git a/src/backend/taler-merchant-httpd_refund.h b/src/backend/taler-merchant-httpd_refund.h
@@ -26,6 +26,26 @@
#include "taler-merchant-httpd.h"
/**
+ * We confirm with a signature that the refund has been successfully
+ * done. Even though the frontend doesn't usually do crypto, this signature
+ * may turn useful in court.
+ */
+struct RefundConfirmationP
+{
+
+ /**
+ * Set to TALER_SIGNATURE_MERCHANT_REFUND_OK.
+ */
+ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
+
+ /**
+ * Hashing the order id, as frontends don't handle contract terms
+ */
+ struct GNUNET_HashCode h_order_id GNUNET_PACKED;
+
+};
+
+/**
* Handle request for increasing the refund associated with
* a contract.
*