taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit 4b7eab84bc77fd8f20527aec35f4a09def2c8dad
parent f3de67012c580c9e3d44121823bee6250a8d1753
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Thu, 29 Oct 2015 21:36:57 +0100

Moving the pay url indication inside the contract. That is due to
the additional complexity required by passing fields other than
'detail' inside a JavaScript CustomEvent. See
https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent

Diffstat:
Mapi-merchant.rst | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/api-merchant.rst b/api-merchant.rst @@ -134,13 +134,14 @@ successful response to the following two calls: :>json int transaction_id: a 53-bit number chosen by the merchant to uniquely identify the contract. :>json array products: a collection of `product` objects (described below), for each different item purchased within this transaction. :>json `date` timestamp: this contract's generation time - :>json `date` refund: the maximum time until which the merchant can refund the wallet in case of a problem, or some request + :>json `date` refund_deadline: the maximum time until which the merchant can refund the wallet in case of a problem, or some request :>json `date` expiry: the maximum time until which the wallet can agree on this contract :>json base32 merchant_pub: merchant's EdDSA key used to sign this contract; this information is typically added by the `backend` :>json object merchant: the set of values describing this `merchant`, defined below :>json base32 H_wire: the hash of the merchant's :ref:`wire details <wireformats>`; this information is typically added by the `backend` :>json base32 H_contract: encoding of the `h_contract` field of contract :ref:`blob <contract-blob>`. Tough the wallet gets all required information to regenerate this hash code locally, the merchant sends it anyway to avoid subtle encoding errors, or to allow the wallet to double check its locally generated copy :>json array auditors: a JSON array of `auditor` objects. To finalize the payment, the wallet should agree on a mint audited by one of these auditos. + :>json string pay_url: the URL where the merchant will receive the deposit permission (i.e. the payment) :>json array mints: a JSON array of `mint` objects. The wallet is encouraged to agree on some of those mints, in case it can't agree on any auditor trusted by this merchant. :>json object locations: maps labels for locations to detailed geographical location data (details for the format of locations are specified below). The label strings must not contain a colon (`:`). These locations can then be references by their respective labels throughout the contract. @@ -322,7 +323,7 @@ when the button is clicked: .. sourcecode:: javascript function deliver_contract_to_wallet(jsonContract){ - var cevent = new CustomEvent('taler-contract', { detail: jsonContract, target: '/taler/pay' }); + var cevent = new CustomEvent('taler-contract', { detail: jsonContract }); document.body.dispatchEvent(cevent); };