merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 12795fb41ecc2e0497eaf55f57a6277c92efc7fc
parent 1108f7ca4dbe418c4e641ba07b6d14316daa1f1d
Author: Florian Dold <florian.dold@gmail.com>
Date:   Wed,  2 Mar 2016 04:50:24 +0100

prettier wallet handling

Diffstat:
Mexamples/blog/essay_cc-form.html | 16+++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/examples/blog/essay_cc-form.html b/examples/blog/essay_cc-form.html @@ -2,7 +2,7 @@ <head> <link rel="stylesheet" type="text/css" href="../style.css"> </head> - <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> + <body style="display:none;" lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> <header> <div id="logo"><a href="/"><img src="../gnu.svg" height="100" width="100"/></a></div> <h1>Credit card payment</h1> @@ -66,13 +66,27 @@ contract_request.send(); } + var walletNotPresent = false; + function has_taler_wallet_cb(aEvent){ + if (walletNotPresent) { + return; + } + // FIXME: this is a template, but very ugly ... {jscode} }; + + + function handleTimeout() { + walletNotPresent = true; + document.body.style.display = ""; + } document.addEventListener("taler-wallet-present", has_taler_wallet_cb, false); + + window.setTimeout(handleTimeout, 200); // Register event to be triggered by the wallet when it gets enabled while // the user is on the payment page