summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2015-12-18 17:25:24 +0100
committerMarcello Stanisci <marcello.stanisci@inria.fr>2015-12-18 17:25:24 +0100
commit670071e758f238fc9ed3196df1cbffc112a7bda7 (patch)
treed9bea66c0c82ea6fa775ee35fd8e25c7f6b9e6c5
parent7edf1824f7098b7fd991bca12cac063a0f25b341 (diff)
parentc4edac528d746747ff6d8015f00374f9c2a0c335 (diff)
downloadmerchant-670071e758f238fc9ed3196df1cbffc112a7bda7.tar.gz
merchant-670071e758f238fc9ed3196df1cbffc112a7bda7.tar.bz2
merchant-670071e758f238fc9ed3196df1cbffc112a7bda7.zip
Merge branch 'master' of ssh://taler.net/var/git/merchant
Conflicts: src/frontend/pay.php
-rw-r--r--src/frontend/pay.php22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/frontend/pay.php b/src/frontend/pay.php
index ba510cdd..aaa5d2e2 100644
--- a/src/frontend/pay.php
+++ b/src/frontend/pay.php
@@ -28,29 +28,19 @@
$cli_debug = false;
$backend_test = true;
-if ($_GET['cli_debug'] == 'yes')
- $cli_debug = true;
-
-if ($_GET['backend_test'] == 'no')
+if (isset($_GET['cli_debug']) && $_GET['cli_debug'] == 'yes')
{
$cli_debug = true;
- $backend_test = false;
}
-session_start();
-
-$cli_debug = false;
-$backend_test = true;
-
-if ($_GET['cli_debug'] == 'yes')
- $cli_debug = true;
-
-if ($_GET['backend_test'] == 'no')
+if (isset($_GET['backend_test']) && $_GET['backend_test'] == 'no')
{
$cli_debug = true;
$backend_test = false;
}
+session_start();
+
$post_body = file_get_contents('php://input');
$now = new DateTime('now');
@@ -105,8 +95,8 @@ if ($status_code != 200)
/* error: just forwarding to the wallet what
gotten from the backend (which is forwarding 'as is'
the error gotten from the mint) */
- echo "Error came from the backend\n";
- echo "json_encode ($new_deposit_permission)";
+ echo json_encode ($new_deposit_permission);
+ echo "Error came from the backend, status $status_code\n";
echo "\n";
echo $resp->body->toString ();
}