summaryrefslogtreecommitdiff
path: root/src/include/taler_wire_plugin.h
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-07-23 14:32:20 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-07-23 14:32:20 +0200
commit6df3227c241e360b84accabff03a8d316ad2af21 (patch)
treece08bd1cdd9b6ac0f07720434366d280455b0066 /src/include/taler_wire_plugin.h
parent9942032ae9f48cc08dcfc57382d2bd4226b898b3 (diff)
downloadexchange-6df3227c241e360b84accabff03a8d316ad2af21.tar.gz
exchange-6df3227c241e360b84accabff03a8d316ad2af21.tar.bz2
exchange-6df3227c241e360b84accabff03a8d316ad2af21.zip
Wire-plugin interface.
Add methods signatures to register merchants at banking institutions.
Diffstat (limited to 'src/include/taler_wire_plugin.h')
-rw-r--r--src/include/taler_wire_plugin.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/include/taler_wire_plugin.h b/src/include/taler_wire_plugin.h
index 2758d2d2e..ddbb725a7 100644
--- a/src/include/taler_wire_plugin.h
+++ b/src/include/taler_wire_plugin.h
@@ -41,6 +41,17 @@ typedef void
/**
+ * Callback to process a merchant registration outcome.
+ *
+ * @param cls closure
+ * @param status GNUNET_OK if the registration succeeded,
+ * GNUNET_NO otherwise.
+ */
+typedef void
+(*TALER_WIRE_MerchantRegisterCallback) (void *cls,
+ unsigned int status);
+
+/**
* Details about a valid wire transfer to the exchange.
* It is the plugin's responsibility to filter and undo
* invalid transfers.
@@ -356,6 +367,34 @@ struct TALER_WIRE_Plugin
struct TALER_WIRE_RejectHandle *rh);
+ /**
+ * Ask the plugin which data is needed to register the merchant
+ * into the banking institution.
+ *
+ * @param enc[out] where to store the JSON formatted list of
+ * needed values. The merchant will use this list to
+ * show a HTML form to the business in order to collect that data.
+ * This value will have to be freed by the caller.
+ * @return GNUNET_OK upon successful `enc' allocation and definition,
+ * GNUNET_NO if _no_ data is needed at all, GNUNET_SYSERR
+ * for all the other cases.
+ */
+ int
+ (*merchant_data)(void);
+
+ /**
+ * Send data to the banking institution in order to get the
+ * merchant registered.
+ *
+ * @param cls closure
+ * @param body subset of information to be sent to the bank.
+ * The plugin implementation is free to modify this value.
+ * @param mrcb Callback to process the outcome.
+ */
+ struct TALER_WIRE_MerchantRegisterHandle *
+ (*merchant_register)(void *cls,
+ const char *body,
+ TALER_WIRE_MerchantRegisterCallback mrcb);
};