gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant] branch master updated: increase_refund_for


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: increase_refund_for_contract skeleton
Date: Thu, 08 Jun 2017 10:45:37 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 3c04b2a  increase_refund_for_contract skeleton
3c04b2a is described below

commit 3c04b2ab23e7d62096ea76b3f41d1215fd313ab2
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Jun 8 10:45:24 2017 +0200

    increase_refund_for_contract skeleton
---
 src/backenddb/plugin_merchantdb_postgres.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/src/backenddb/plugin_merchantdb_postgres.c 
b/src/backenddb/plugin_merchantdb_postgres.c
index 1a0fc58..6fbb7ab 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -1570,6 +1570,29 @@ postgres_get_refunds_from_contract_terms_hash (void *cls,
   return GNUNET_OK;
 }
 
+/**
+ * Function called when some backoffice staff decides to award or
+ * increase the refund on an existing contract.
+ *
+ * @param cls closure
+ * @param h_contract_terms
+ * @param refund maximum refund to return to the customer for this contract
+ * @param reason 0-terminated UTF-8 string giving the reason why the customer
+ *               got a refund (free form, business-specific)
+ * @return #GNUNET_OK if the refund is accepted
+ *         #GNUNET_NO if the refund is at or below the previous refund amount
+ *         #GNUNET_SYSERR on database error, i.e. contract unknown, DB on fire,
+ *               (FIXME: distinguish hard/soft? who does retries?)
+ */
+int
+postgres_increase_refund_for_contract (void *cls,
+                                       const struct GNUNET_HashCode 
*h_contract_terms,
+                                       const struct TALER_Amount *refund,
+                                       const char *reason)
+{
+  /*FIXME, put logic*/
+  return GNUNET_SYSERR;
+}
 
 /**
  * Lookup proof information about a wire transfer.
@@ -1709,6 +1732,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
   plugin->find_contract_terms_by_date_and_range = 
&postgres_find_contract_terms_by_date_and_range;
   plugin->find_contract_terms_from_hash = 
&postgres_find_contract_terms_from_hash;
   plugin->get_refunds_from_contract_terms_hash = 
&postgres_get_refunds_from_contract_terms_hash;
+  plugin->increase_refund_for_contract = postgres_increase_refund_for_contract;
 
   return plugin;
 }

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]