exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

taler-exchange-httpd_refund.h (1705B)


      1 /*
      2   This file is part of TALER
      3   Copyright (C) 2014, 2015, 2016 Taler Systems SA
      4 
      5   TALER is free software; you can redistribute it and/or modify it under the
      6   terms of the GNU Affero General Public License as published by the Free Software
      7   Foundation; either version 3, or (at your option) any later version.
      8 
      9   TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     10   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     11   A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
     12 
     13   You should have received a copy of the GNU Affero General Public License along with
     14   TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15 */
     16 /**
     17  * @file taler-exchange-httpd_refund.h
     18  * @brief Handle /refund requests
     19  * @author Florian Dold
     20  * @author Benedikt Mueller
     21  * @author Christian Grothoff
     22  */
     23 #ifndef TALER_EXCHANGE_HTTPD_REFUND_H
     24 #define TALER_EXCHANGE_HTTPD_REFUND_H
     25 
     26 #include <gnunet/gnunet_util_lib.h>
     27 #include <microhttpd.h>
     28 #include "taler-exchange-httpd.h"
     29 
     30 
     31 /**
     32  * Handle a "/coins/$COIN_PUB/refund" request.  Parses the JSON, and, if
     33  * successful, passes the JSON data to #verify_and_execute_refund() to further
     34  * check the details of the operation specified.  If everything checks out,
     35  * this will ultimately lead to the refund being executed, or rejected.
     36  *
     37  * @param connection the MHD connection to handle
     38  * @param coin_pub public key of the coin
     39  * @param root uploaded JSON data
     40  * @return MHD result code
     41  */
     42 MHD_RESULT
     43 TEH_handler_refund (struct MHD_Connection *connection,
     44                     const struct TALER_CoinSpendPublicKeyP *coin_pub,
     45                     const json_t *root);
     46 
     47 #endif