[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant-frontends] branch master updated: Extractin
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant-frontends] branch master updated: Extracting details from tracked order; just logged. |
Date: |
Mon, 27 Feb 2017 18:00:09 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant-frontends.
The following commit(s) were added to refs/heads/master by this push:
new 21fc6e9 Extracting details from tracked order; just logged.
21fc6e9 is described below
commit 21fc6e9773036a8c24c613a55e07e2e78aa22819
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Feb 27 17:59:34 2017 +0100
Extracting details from tracked order; just logged.
---
talerfrontends/blog/blog.py | 2 +-
talerfrontends/blog/static/backoffice.js | 28 +++++++++++++++++++++++++++-
2 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/talerfrontends/blog/blog.py b/talerfrontends/blog/blog.py
index 6931d62..0eace7c 100644
--- a/talerfrontends/blog/blog.py
+++ b/talerfrontends/blog/blog.py
@@ -201,4 +201,4 @@ def track_order():
if 424 == r.status_code:
raise TrackTransactionConflictError(r.status_code, order_id, r.text)
- return flask.jsonify(r.text)
+ return flask.jsonify(r.json())
diff --git a/talerfrontends/blog/static/backoffice.js
b/talerfrontends/blog/static/backoffice.js
index 8e01469..871cd0d 100644
--- a/talerfrontends/blog/static/backoffice.js
+++ b/talerfrontends/blog/static/backoffice.js
@@ -48,7 +48,33 @@ function parse_date(date){
}
function track_order(order_id, instance){
- console.log("/track/order", order_id, instance);
+ var req = new XMLHttpRequest();
+ req.open("GET", `/track/order?order_id=${order_id}&instance=${instance}`,
true);
+ req.onload = function(){
+ if(req.readyState == 4 && req.status == 200){
+ var tracks = JSON.parse(req.responseText);
+ if(!tracks)
+ console.log("Got invalid JSON");
+ if(0 == tracks.length){
+ console.log("Got no tracks AND status == 200. Should not be here.");
+ return;
+ }
+ for(var i=0; i<tracks.length; i++){
+ var entry = tracks[i];
+ console.log("i", i);
+ console.log("Exchange", entry.exchange);
+ console.log("WTID", entry.wtid);
+ console.log("execution_time", parse_date(entry.execution_time));
+ for(var j=0; j<entry.coins.length; j++){
+ var coin = entry.coins[j];
+ console.log(" i, coin_pub", coin.coin_pub);
+ console.log(" i, amount_with_fee",
amount_to_string(coin.amount_with_fee));
+ console.log(" i, deposit_fee", amount_to_string(coin.deposit_fee));
+ }
+ }
+ }
+ }
+ req.send();
}
function get_history(){
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant-frontends] branch master updated: Extracting details from tracked order; just logged.,
gnunet <=