diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-04-06 02:29:01 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-04-06 02:29:01 +0200 |
commit | 4116280b5f33c3749264b22981b659b1066cff11 (patch) | |
tree | 5dd501c7d9c7ec2f5b4106cadca61bf019bd02c1 | |
parent | 89c5d1fc4422f5aa7ca4989677ebe58885382671 (diff) | |
download | merchant-4116280b5f33c3749264b22981b659b1066cff11.tar.gz merchant-4116280b5f33c3749264b22981b659b1066cff11.tar.bz2 merchant-4116280b5f33c3749264b22981b659b1066cff11.zip |
use executePayment from web-common
-rw-r--r-- | examples/blog/essay_cc-form.html | 11 | ||||
-rw-r--r-- | examples/blog/essay_fulfillment.php | 2 | ||||
m--------- | examples/blog/web-common | 0 | ||||
-rw-r--r-- | examples/shop/fulfillment.php | 15 | ||||
m--------- | examples/shop/web-common | 0 |
5 files changed, 5 insertions, 23 deletions
diff --git a/examples/blog/essay_cc-form.html b/examples/blog/essay_cc-form.html index c4f3418d..9cebb33c 100644 --- 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"> + <link rel="stylesheet" type="text/css" href="web-common/taler-wallet-lib.js"> </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 index 17956418..b710621d 100644 --- 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/blog/web-common b/examples/blog/web-common -Subproject f96b0ebfeb0bf57a432693eedd85d9fb708a9e5 +Subproject 461b502d3ce0547dc8c70bdc3d5da0337eab533 diff --git a/examples/shop/fulfillment.php b/examples/shop/fulfillment.php index c99a4768..e87d6d96 100644 --- 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; } diff --git a/examples/shop/web-common b/examples/shop/web-common -Subproject f96b0ebfeb0bf57a432693eedd85d9fb708a9e5 +Subproject 461b502d3ce0547dc8c70bdc3d5da0337eab533 |