diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-07-05 09:38:50 +0200 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-07-05 09:39:06 +0200 |
commit | 71d4d4ced10dbb995bb28605e60ffbda68be88a3 (patch) | |
tree | eaeb81e4d04629a67b3f1cba812a4a436ab07e4f /src | |
parent | 3b2b43cbab432fd5609f57f38e97699f01df21e3 (diff) | |
download | merchant-71d4d4ced10dbb995bb28605e60ffbda68be88a3.tar.gz merchant-71d4d4ced10dbb995bb28605e60ffbda68be88a3.tar.bz2 merchant-71d4d4ced10dbb995bb28605e60ffbda68be88a3.zip |
moving definitions to header file
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/taler-merchant-httpd_refund.c | 27 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd_refund.h | 20 |
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 index b196870f..dbbbd3de 100644 --- 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 index 64da3f9b..c19d69e7 100644 --- 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. * |