summaryrefslogtreecommitdiff
path: root/integration-merchant.rst
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-01-20 15:56:47 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-01-20 15:56:47 +0100
commit288602cc2bedd17731dbc44d70711b8942c23164 (patch)
treedb4fe3072534a7eb529204e18b164ca4e623ed23 /integration-merchant.rst
parent897539f7fa7566f0a42fbedc4a0959f28e977568 (diff)
downloaddocs-288602cc2bedd17731dbc44d70711b8942c23164.tar.gz
docs-288602cc2bedd17731dbc44d70711b8942c23164.tar.bz2
docs-288602cc2bedd17731dbc44d70711b8942c23164.zip
event doc
Diffstat (limited to 'integration-merchant.rst')
-rw-r--r--integration-merchant.rst38
1 files changed, 34 insertions, 4 deletions
diff --git a/integration-merchant.rst b/integration-merchant.rst
index 37aac50..577f4d5 100644
--- a/integration-merchant.rst
+++ b/integration-merchant.rst
@@ -10,11 +10,41 @@ The purchase flow consists of the following steps:
1. UA visits merchant's checkout page
2. The merchant's checkout page notifies the wallet
- of the contract (``taler-deliver-contract``)
+ of the contract (``taler-deliver-contract``).
3. The user reviews the contract inside the wallet
-4. The wallet directs the UA to the payment execution page (``taler-execute-contract``)
+4. The wallet directs the UA to the payment execution page
+5. The execution page must send the event ``taler-execute-payment`` with
+ the contract hash of the payment to be executed.
+6. The wallet executes the payment in the domain context of the
+ execution page and emits the ``taler-payment-result`` event
+ on the execution page.
+7. The execution page reacts to the payment result (which
+ is either successful or unsuccessful) by showing
+ an appropriate response to the user.
-The *execution page* allows the wallet to make a request
-to the merchant from the store's domain.
+----------------
+Event Reference
+----------------
+.. topic:: ``taler-deliver-contract``
+ The event takes an :ref:`offer <offer>` as event detail.
+
+.. topic:: ``taler-execute-payment``
+
+ The event takes `H_contract` of a :ref:`Contract <tsref-type-Contract>` as event detail.
+
+.. topic:: ``taler-payment-result``
+
+ The event takes the following object as event detail:
+
+ .. code-block:: tsref
+
+ {
+ // was the payment successful?
+ success: boolean;
+
+ // human-readable indication of what went wrong
+ hint: string;
+ }
+