summaryrefslogtreecommitdiff
path: root/libeufin/nexus-tutorial.rst
diff options
context:
space:
mode:
authorThien-Thi Nguyen <ttn@gnuvola.org>2022-02-21 20:40:24 -0500
committerThien-Thi Nguyen <ttn@gnuvola.org>2022-02-21 20:44:10 -0500
commit050864edb87baf1a84553c0fdd313fcf2df82792 (patch)
tree8a1a5aa9e5f8f60bb61e061d4ca390bda3a5f0d1 /libeufin/nexus-tutorial.rst
parent5c5d4df3e18ea1b0e06a2b647aa1ac51a81a822d (diff)
downloaddocs-050864edb87baf1a84553c0fdd313fcf2df82792.tar.gz
docs-050864edb87baf1a84553c0fdd313fcf2df82792.tar.bz2
docs-050864edb87baf1a84553c0fdd313fcf2df82792.zip
Rewrite "configuring the sandbox" section
This is based on helpful feedback and hints from MS. (But any mistakes are mine.)
Diffstat (limited to 'libeufin/nexus-tutorial.rst')
-rw-r--r--libeufin/nexus-tutorial.rst165
1 files changed, 118 insertions, 47 deletions
diff --git a/libeufin/nexus-tutorial.rst b/libeufin/nexus-tutorial.rst
index 27cca598..0a935935 100644
--- a/libeufin/nexus-tutorial.rst
+++ b/libeufin/nexus-tutorial.rst
@@ -195,102 +195,173 @@ Now an EBICS host can be created:
Note that most ``libeufin-cli`` subcommands will ask for input interactively if
the respective value is not specified on the command line.
-Next, create an EBICS subscriber (identified by the partner ID and user ID) for the host:
+Next, register a user. For the ``libeufin-cli sandbox demobank register``
+command, the ``LIBEUFIN_SANDBOX_USERNAME`` and ``LIBEUFIN_SANDBOX_PASSWORD``
+are assumed to be ``jrluser`` and ``easy``, respectively.
+Also, the URL for all ``libeufin-cli sandbox demobank`` commands
+must include the name of a bank, as follows:
.. code-block:: console
- $ libeufin-cli sandbox ebicssubscriber create \
- --host-id testhost --partner-id partner01 --user-id user01
+ $ export LIBEUFIN_SANDBOX_USERNAME=jrluser
+ $ export LIBEUFIN_SANDBOX_PASSWORD=easy
+ $ libeufin-cli sandbox \
+ --sandbox-url http://localhost:5016/demobanks/default \
+ demobank register
+
+In this example, the bank name is ``default``. In these examples, we use the
+``--sandbox-url`` option for the ``demobank`` commands, so that we don't need
+to change the environment variable ``LIBEUFIN_SANDBOX_URL`` for the
+non-``demobank`` commands.
+
+With a user registered, we can now create an EBICS subscriber (identified by
+the partner ID and user ID) for the host. This command requires admin
+priveleges, so ``LIBEUFIN_SANDBOX_USERNAME`` and ``LIBEUFIN_SANDBOX_PASSWORD``
+are reset back to ``admin`` and ``secret``, respectively.
+
+.. code-block:: console
+
+ $ export LIBEUFIN_SANDBOX_USERNAME=admin
+ $ export LIBEUFIN_SANDBOX_PASSWORD=secret
+ $ libeufin-cli sandbox \
+ --sandbox-url http://localhost:5016/demobanks/default \
+ demobank new-ebicssubscriber \
+ --host-id testhost \
+ --partner-id partner01 \
+ --user-id user02 \
+ --bank-account jrluser
$ libeufin-cli sandbox ebicssubscriber list
{
"subscribers" : [ {
"hostID" : "testhost",
"partnerID" : "partner01",
- "userID" : "user01",
+ "userID" : "user02",
"systemID" : null,
- "demobankAccountLabel" : "not associated yet"
+ "demobankAccountLabel" : "jrluser"
} ]
}
-Create a bank account for the subscriber and add a sample transaction:
-
-.. code-block:: console
-
- $ libeufin-cli sandbox ebicsbankaccount create \
- --iban DE18500105172929531888 \
- --bic INGDDEFFXXX \
- --person-name "Jane Normal" \
- --account-name "testacct01" \
- --ebics-host-id testhost \
- --ebics-user-id user01 \
- --ebics-partner-id partner01
-
-The account name ``testacct01`` is the unique identifier of the account within
+The ``libeufin-cli sandbox demobank new-ebicssubscriber`` command
+also creates an associated bank account. You can see it with command:
+
+ $ libeufin-cli sandbox bankaccount list
+ [ {
+ "label" : "bank",
+ "name" : "Bank account owner's name",
+ "iban" : "DE895351",
+ "bic" : "SANDBOXX"
+ }, {
+ "label" : "jrluser",
+ "name" : "Bank account owner's name",
+ "iban" : "DE724881",
+ "bic" : "SANDBOXX"
+ } ]
+
+The account name ``jrluser`` is the unique identifier of the account within
the sandbox. The EBICS parameters identify the subscriber that should have
access to the bank account via EBICS.
.. note::
- Currently, the person name ("Jane Normal" in the example above) is
- discarded by the sandbox. It displays "Bank account owner's name" instead.
+ Currently, the person (given human) name is not maintained by
+ the sandbox. It displays "Bank account owner's name" instead.
-To populate the account with some test transactions, run the following command
-(note that we use the ``bankaccount`` subcommand, because there is no need to rely
-on EBICS):
+The account already has one transaction, the "Sign-up bonus" from the bank.
+Note that in the following examples we transition to using the ``bankaccount``
+subcommand, because there is no need to rely on EBICS:
.. code-block:: console
- $ libeufin-cli sandbox bankaccount generate-transactions testacct01
+ $ cli-sandbox bankaccount transactions jrluser
+ {
+ "payments" : [ {
+ "accountLabel" : "jrluser",
+ "creditorIban" : "DE724881",
+ "creditorBic" : "SANDBOXX",
+ "creditorName" : "Unknown",
+ "debtorIban" : "DE895351",
+ "debtorBic" : "SANDBOXX",
+ "debtorName" : "The Bank",
+ "amount" : "100",
+ "currency" : "EUR",
+ "subject" : "Sign-up bonus",
+ "date" : "Tue, 22 Feb 2022 00:04:15 GMT",
+ "creditDebitIndicator" : "credit",
+ "accountServicerReference" : "2NG75I0O",
+ "paymentInformationId" : null
+ } ]
+ }
+
+To populate the account with some more transactions, run the following command:
.. code-block:: console
- $ libeufin-cli sandbox bankaccount simulate-incoming-transaction testacct01 \
+ $ libeufin-cli sandbox bankaccount generate-transactions jrluser
+
+.. code-block:: console
+
+ $ libeufin-cli sandbox bankaccount simulate-incoming-transaction jrluser \
--debtor-iban DE06500105174526623718 \
--debtor-bic INGDDEFFXXX \
--debtor-name "Joe Foo" \
--subject "Hello World" \
--amount 10.50
-Payments to a sandbox bank account can be listed as follows:
+Now the list of transactions has grown by several entries:
.. code-block:: console
- $ libeufin-cli sandbox bankaccount transactions testacct01
+ $ libeufin-cli sandbox bankaccount transactions jrluser
{
"payments" : [ {
- "accountLabel" : "testacct01",
- "creditorIban" : "DE18500105172929531888",
- "creditorBic" : "INGDDEFFXXX",
+ "accountLabel" : "jrluser",
+ "creditorIban" : "DE724881",
+ "creditorBic" : "SANDBOXX",
+ "creditorName" : "Unknown",
+ "debtorIban" : "DE895351",
+ "debtorBic" : "SANDBOXX",
+ "debtorName" : "The Bank",
+ "amount" : "100",
+ "currency" : "EUR",
+ "subject" : "Sign-up bonus",
+ "date" : "Tue, 22 Feb 2022 00:04:15 GMT",
+ "creditDebitIndicator" : "credit",
+ "accountServicerReference" : "2NG75I0O",
+ "paymentInformationId" : null
+ }, {
+ "accountLabel" : "jrluser",
+ "creditorIban" : "DE724881",
+ "creditorBic" : "SANDBOXX",
"creditorName" : "Creditor Name",
"debtorIban" : "DE64500105178797276788",
"debtorBic" : "DEUTDEBB101",
"debtorName" : "Max Mustermann",
- "amount" : "5",
+ "amount" : "22",
"currency" : "EUR",
- "subject" : "sample transaction DILWBJHL",
- "date" : "Wed, 26 Jan 2022 09:03:44 GMT",
+ "subject" : "sample transaction GSF7S5LC",
+ "date" : "Tue, 22 Feb 2022 01:26:18 GMT",
"creditDebitIndicator" : "credit",
- "accountServicerReference" : "DILWBJHL",
+ "accountServicerReference" : "GSF7S5LC",
"paymentInformationId" : null
}, {
- "accountLabel" : "testacct01",
+ "accountLabel" : "jrluser",
"creditorIban" : "DE64500105178797276788",
"creditorBic" : "DEUTDEBB101",
"creditorName" : "Max Mustermann",
- "debtorIban" : "DE18500105172929531888",
- "debtorBic" : "INGDDEFFXXX",
+ "debtorIban" : "DE724881",
+ "debtorBic" : "SANDBOXX",
"debtorName" : "Debitor Name",
- "amount" : "12",
+ "amount" : "10",
"currency" : "EUR",
- "subject" : "sample transaction N7JSY17B",
- "date" : "Wed, 26 Jan 2022 09:03:44 GMT",
+ "subject" : "sample transaction 1WUP303Q",
+ "date" : "Tue, 22 Feb 2022 01:26:18 GMT",
"creditDebitIndicator" : "debit",
- "accountServicerReference" : "N7JSY17B",
+ "accountServicerReference" : "1WUP303Q",
"paymentInformationId" : null
}, {
- "accountLabel" : "testacct01",
- "creditorIban" : "DE18500105172929531888",
- "creditorBic" : "INGDDEFFXXX",
+ "accountLabel" : "jrluser",
+ "creditorIban" : "DE724881",
+ "creditorBic" : "SANDBOXX",
"creditorName" : "Creditor Name",
"debtorIban" : "DE06500105174526623718",
"debtorBic" : "INGDDEFFXXX",
@@ -298,9 +369,9 @@ Payments to a sandbox bank account can be listed as follows:
"amount" : "10.50",
"currency" : "EUR",
"subject" : "Hello World",
- "date" : "Wed, 26 Jan 2022 09:04:31 GMT",
+ "date" : "Tue, 22 Feb 2022 01:26:41 GMT",
"creditDebitIndicator" : "credit",
- "accountServicerReference" : "sandbox-6UI2J3636J9EESXO",
+ "accountServicerReference" : "sandbox-ALQP8TXKJWRVKMAH",
"paymentInformationId" : null
} ]
}