diff options
author | Jeff Burdges <burdges@gnunet.org> | 2016-08-24 16:41:37 +0200 |
---|---|---|
committer | Jeff Burdges <burdges@gnunet.org> | 2016-08-24 16:41:37 +0200 |
commit | 33e7fb56a119ef72e5c6d6ccf77b044b417bdfc6 (patch) | |
tree | 36e2c118b9aeb85ef60dfb02895a4de9c6284f6e /articles/ui/figs | |
parent | c83dedf076439ecd04db462e9142202ca1318f98 (diff) | |
parent | fc4ea95df55a93ffb3843badf084036fdf1b65d9 (diff) | |
download | wallet-core-33e7fb56a119ef72e5c6d6ccf77b044b417bdfc6.tar.xz |
Merge branch 'master' of git.taler.net:/var/git/wallet-webex
Diffstat (limited to 'articles/ui/figs')
-rw-r--r-- | articles/ui/figs/taler-contract.html | 6 | ||||
-rw-r--r-- | articles/ui/figs/taler-contract.js | 35 | ||||
-rw-r--r-- | articles/ui/figs/taler-presence-js.html | 5 |
3 files changed, 8 insertions, 38 deletions
diff --git a/articles/ui/figs/taler-contract.html b/articles/ui/figs/taler-contract.html new file mode 100644 index 000000000..7d4b8d5bf --- /dev/null +++ b/articles/ui/figs/taler-contract.html @@ -0,0 +1,6 @@ +<script src="taler-wallet-lib.js"></script> +<script> + taler.offerContractFrom("https://myshop/products/article/42", (err) => { + alert("Error while offering contract"); + }); +</script> diff --git a/articles/ui/figs/taler-contract.js b/articles/ui/figs/taler-contract.js deleted file mode 100644 index aaf4b79c3..000000000 --- a/articles/ui/figs/taler-contract.js +++ /dev/null @@ -1,35 +0,0 @@ -/* Trigger Taler contract generation on the server, and pass the - contract to the extension once we got it. */ -function taler_pay(form) { - var contract_request = new XMLHttpRequest(); - - /* Note that the URL we give here is simply an example - and not dictated by the protocol: each web shop can - have its own way of generating and transmitting the - contract, there just must be a way to get the contract - and to pass it to the wallet when the user selects 'Pay'. */ - contract_request.open("GET", "generate-taler-contract", true); - contract_request.onload = function (e) { - if (contract_request.readyState == 4) { - if (contract_request.status == 200) { - /* Send contract to the extension. */ - handle_contract(contract_request.responseText); - } else { - /* There was an error obtaining the contract from the merchant, - obviously this should not happen. To keep it simple, we just - alert the user to the error. */ - alert("Failure to download contract " + - "(" + contract_request.status + "):\n" + - contract_request.responseText); - } - } - }; - contract_request.onerror = function (e) { - /* There was an error obtaining the contract from the merchant, - obviously this should not happen. To keep it simple, we just - alert the user to the error. */ - alert("Failure requesting the contract:\n" + - contract_request.statusText); - }; - contract_request.send(); -} diff --git a/articles/ui/figs/taler-presence-js.html b/articles/ui/figs/taler-presence-js.html index 9b54a7b53..9770815f5 100644 --- a/articles/ui/figs/taler-presence-js.html +++ b/articles/ui/figs/taler-presence-js.html @@ -1,10 +1,9 @@ <script src="taler-wallet-lib.js"></script> <script> taler.onPresent(() => { - + alert("Taler wallet is installed"); }); - taler.onAbsent(() => { - alert("Taler isn't installed"); + alert("Taler wallet is not installed"); }); </script> |