diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-11-19 16:50:40 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-11-19 16:50:40 +0100 |
commit | 03bf693258b5d64e91abee77310e70e9804b775b (patch) | |
tree | 2c44ca8d7375382b878e27baff6f7562ceaa6d4b | |
parent | 2055c46ba2a75c8a110255a06fc3865d6da1d1dd (diff) | |
download | merchant-03bf693258b5d64e91abee77310e70e9804b775b.tar.gz merchant-03bf693258b5d64e91abee77310e70e9804b775b.tar.bz2 merchant-03bf693258b5d64e91abee77310e70e9804b775b.zip |
Fullfillment page detects whether the user comes from a purchase
or not
-rw-r--r-- | src/frontend/fullfillment.html | 12 | ||||
-rw-r--r-- | src/frontend/fullfillment.php | 50 | ||||
-rw-r--r-- | src/frontend/pay.php | 12 |
3 files changed, 53 insertions, 21 deletions
diff --git a/src/frontend/fullfillment.html b/src/frontend/fullfillment.html deleted file mode 100644 index 2053f717..00000000 --- a/src/frontend/fullfillment.html +++ /dev/null @@ -1,12 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <title>Taler's "Demo" Shop</title> - <link rel="stylesheet" type="text/css" href="style.css"> -</head> -<body id="css-zen-garden" onload="signal_me()"> -<p>Congratulations, your purchase has succeeded! Go to <a href="/"> -our homepage</a>, or visit <a href="http://taler.net">taler.net</a>. -</p> -</body> -</html> diff --git a/src/frontend/fullfillment.php b/src/frontend/fullfillment.php new file mode 100644 index 00000000..ced9a183 --- /dev/null +++ b/src/frontend/fullfillment.php @@ -0,0 +1,50 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <title>Taler's "Demo" Shop</title> + <link rel="stylesheet" type="text/css" href="style.css"> +</head> +<body> + +<?php +/* + This file is part of GNU TALER. + Copyright (C) 2014, 2015 GNUnet e.V. + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU Lesser General Public License as published by the Free Software + Foundation; either version 2.1, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/> + +*/ + +$cli_debug = false; +$backend_test = true; + +if ($_GET['cli_debug'] == 'yes') + $cli_debug = true; + +if ($_GET['backend_test'] == 'no') +{ + $cli_debug = true; + $backend_test = false; +} + +session_start(); +$receiver = $_SESSION['receiver']; + +if (! $receiver) + echo "Please buy something before landing here!"; +else + echo "Thanks for donating to " . $receiver; + +?> + +</body> +</html> diff --git a/src/frontend/pay.php b/src/frontend/pay.php index e7e9e274..face8080 100644 --- a/src/frontend/pay.php +++ b/src/frontend/pay.php @@ -92,15 +92,9 @@ if ($status_code != 200) } else { - /*$resp_page = "<html><title>GNU Taler payment</title>" - . "<body>Payment succeeded! Go to <a href=\"http://" - . $_SERVER["SERVER_NAME"] . "\">our homepage</a></body></html>";*/ - header("Content-Type", "application/json"); - /*$resp_page = "<html><title>GNU Taler payment</title>" - . "<body>Payment succeeded!</body></html>";*/ - - $ffill_obj = array ("fullfillment_page" => "http://" . $_SERVER['SERVER_NAME'] . "/fullfillment"); - echo json_encode ($ffill_obj); +http_response_code (301); +header("Location: http://" . $_SERVER["SERVER_NAME"] . "/fullfillment"); +die(); } ?> |