From 0f8d396a7163a40b52a21b9896a7656ab7916d06 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Wed, 21 Sep 2016 11:51:41 +0200 Subject: documenting merchant's keying, currency, database --- api-exchange.rst | 11 ++++++----- glossary.rst | 2 ++ impl-exchange.rst | 7 ++++++- impl-merchant.rst | 50 ++++++++++++++++++++++++++++++++++++++------------ 4 files changed, 52 insertions(+), 18 deletions(-) diff --git a/api-exchange.rst b/api-exchange.rst index 1ed3eaf6..63ac477c 100644 --- a/api-exchange.rst +++ b/api-exchange.rst @@ -15,16 +15,17 @@ @author Christian Grothoff -========================= +============================= The Exchange RESTful JSON API -========================= +============================= The API specified here follows the :ref:`general conventions ` -for all details not specified in the individual requests. +for all details not specified in the individual requests. The :ref:`glossary` +defines all specific terms used in this section. -------------------- +----------------------- Obtaining Exchange Keys -------------------- +----------------------- This API is used by wallets and merchants to obtain global information about the exchange, such as online signing keys, available denominations and the fee diff --git a/glossary.rst b/glossary.rst index 7e8e9241..d9a6cfa7 100644 --- a/glossary.rst +++ b/glossary.rst @@ -16,6 +16,8 @@ @author Florian Dold @author Christian Grothoff +.. _glossary: + ============== Taler Glossary ============== diff --git a/impl-exchange.rst b/impl-exchange.rst index 1330f360..ce2cb4d7 100644 --- a/impl-exchange.rst +++ b/impl-exchange.rst @@ -102,7 +102,7 @@ key at the location mentioned in `master_priv_file`, it will automatically gener Database -------- -The option `db` under section `[exchange]` lets specify which DB backend the exchange +The option `db` under section `[exchange]` gets the DB backend's name the exchange is going to use. So far, only `db = postgres` is supported. After choosing the backend, it is mandatory to supply the connection string (namely, the database name). This is possible in two ways: @@ -112,6 +112,11 @@ possible in two ways: .. code-block:: text + [exchange] + ... + db = postgres + ... + [exchange-postgres] db_conn_str = postgres:///talerdemo diff --git a/impl-merchant.rst b/impl-merchant.rst index 1a6271ee..45c83baf 100644 --- a/impl-merchant.rst +++ b/impl-merchant.rst @@ -29,19 +29,45 @@ The following data and facilities have to be set up, in order to run an exchange * Instances * Exchanges -=============================== -Operating the Merchant Frontend -=============================== +------ +Keying +------ -Do we really want to keep this in a "how to run a Taler component" section? -A merchant FE is not really a Taler 'component'. +The merchant backend can serve HTTP over both TCP and UNIX domain socket. -+++++++++++++ -Configuration -+++++++++++++ +The following values are to be configured under the section `[merchant]`: -The following data and facilities have to be set up, in order to run an exchange: +* `SERVE`: must be set to `tcp` to serve HTTP over TCP, or `unix` to serve HTTP over a UNIX domain socket +* `PORT`: set to the TCP port to listen on if `SERVE` is `tcp`. +* `UNIXPATH`: set to the UNIX domain socket path to listen on if `SERVE` is `unix` +* `UNIXPATH_MODE`: number giving the mode with the access permission mask for the `UNIXPATH` (i.e. 660 = rw-rw----). -* Backend -* Refund deadline -* Instances +-------- +Currency +-------- + +The merchant backend supports only one currency. This data is set under the respective +option `currency` in section `[taler]`. + +-------- +Database +-------- + +The option `db` under section `[merchant]` gets the DB backend's name the merchant +is going to use. So far, only `db = postgres` is supported. After choosing the backend, +it is mandatory to supply the connection string (namely, the database name). This is +possible in two ways: + +* via an environment variable: `TALER_MERCHANTDB_POSTGRES_CONFIG`. +* via configuration option `config`, under section `[merchantdb-BACKEND]`. For example, +the demo merchant is configured as follows: + +.. code-block:: text + + [merchant] + ... + db = postgres + ... + + [merchantdb-postgres] + config = postgres:///talerdemo -- cgit v1.2.3