merchant

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

commit 5f1e6aa05f58d668c806d12fcbc8bd266af81319
parent ab2268f1f564aa92e76dcbffb3dae0fc442ff5ae
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu,  7 Apr 2016 10:32:54 +0200

Merge branch 'master' of git.taler.net:/var/git/merchant

Diffstat:
Mexamples/blog/essay_cc-form.html | 11+----------
Mexamples/blog/essay_fulfillment.php | 2+-
Mexamples/shop/fulfillment.php | 15+++------------
3 files changed, 5 insertions(+), 23 deletions(-)

diff --git a/examples/blog/essay_cc-form.html b/examples/blog/essay_cc-form.html @@ -21,6 +21,7 @@ <html> <head> <link rel="stylesheet" type="text/css" href="web-common/style.css"> + <script src="web-common/taler-wallet-lib.js"></script> </head> <body style="display:none;" lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> <header> @@ -114,16 +115,6 @@ false); timer = window.setTimeout(handleTimeout, 250); - - function executePayment(H_contract, pay_url, offering_url) { - var detail = { - H_contract: H_contract, - pay_url: pay_url, - offering_url: offering_url - }; - var eve = new CustomEvent('taler-execute-payment', {detail: detail}); - document.dispatchEvent(eve); - } </script> <script type="application/javascript" src="web-common/taler-presence.js"></script> diff --git a/examples/blog/essay_fulfillment.php b/examples/blog/essay_fulfillment.php @@ -79,7 +79,7 @@ $hc = json_decode($resp->body->toString(), true)['H_contract']; $my_payment['hc'] = $hc; log_string("sending payment event"); - $js_code = "executePayment(\"$hc\", \"$pay_url\", \"$offering_url\");"; + $js_code = "taler.executePayment(\"$hc\", \"$pay_url\", \"$offering_url\");"; $cc_page = template("./essay_cc-form.html", array('article' => $article, 'jscode' => $js_code)); echo $cc_page; return; diff --git a/examples/shop/fulfillment.php b/examples/shop/fulfillment.php @@ -18,17 +18,8 @@ <head> <title>Taler's "Demo" Shop</title> <link rel="stylesheet" type="text/css" href="web-common/style.css"> - <script type="application/javascript" src="web-common/taler-presence.js"></script> + <script type="application/javascript" src="web-common/taler-wallet-lib.js"></script> <script type="application/javascript"> - function executePayment(H_contract, pay_url, offering_url) { - var detail = { - H_contract: H_contract, - pay_url: pay_url, - offering_url: offering_url - }; - var eve = new CustomEvent('taler-execute-payment', {detail: detail}); - document.dispatchEvent(eve); - } function makeVisible() { function cb() { document.body.style.display = ""; @@ -81,7 +72,7 @@ if (null === $my_payment) { // TODO: show spinner after timeout echo "<p>you do not have the session state for this contract: " . $hc . "</p>"; echo "<p>Asking the wallet to re-execute it ... </p>"; - echo "<script>executePayment('$hc', '$pay_url', '$offering_url');</script>"; + echo "<script>taler.executePayment('$hc', '$pay_url', '$offering_url');</script>"; return; } @@ -89,7 +80,7 @@ if (true !== get($my_payment["is_payed"], false)) { // TODO: show spinner after timeout echo "<p>you have not payed for this contract: " . $hc . "</p>"; echo "<p>Asking the wallet to re-execute it ... </p>"; - echo "<script>executePayment('$hc', '$pay_url');</script>"; + echo "<script>taler.executePayment('$hc', '$pay_url');</script>"; return; }