summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2015-12-15 11:59:50 +0100
committerMarcello Stanisci <marcello.stanisci@inria.fr>2015-12-15 11:59:50 +0100
commitd92aa4e56352b0c878c49014f57826e841956587 (patch)
treef247dcf5d6295341fab8a3f6f841ea6f9f9c213d
parent37a1bc14d3629ae3aefec202ea5f9a2eae152235 (diff)
downloadmerchant-d92aa4e56352b0c878c49014f57826e841956587.tar.gz
merchant-d92aa4e56352b0c878c49014f57826e841956587.tar.bz2
merchant-d92aa4e56352b0c878c49014f57826e841956587.zip
Adding links in salutations after successful payment
-rw-r--r--src/frontend/fullfillment.php25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/frontend/fullfillment.php b/src/frontend/fullfillment.php
index d7677aa7..40762b19 100644
--- a/src/frontend/fullfillment.php
+++ b/src/frontend/fullfillment.php
@@ -27,6 +27,13 @@
$cli_debug = false;
$backend_test = true;
+function generate_msg ($link){
+ $msg = "Thanks for donating to " . $_SESSION['receiver'] . ".";
+ if (false != $link)
+ $msg .= " Check our latest <a href=\"" . $link . "\">news!</a>";
+ return $msg;
+}
+
if ($_GET['cli_debug'] == 'yes')
$cli_debug = true;
@@ -38,11 +45,23 @@ if ($_GET['backend_test'] == 'no')
session_start();
-
if (! isset ($_SESSION['payment_ok']))
echo "Please land here after a successful payment!";
-else
- echo "Thanks for donating to " . $_SESSION['receiver'];
+else{
+ $news = false;
+ switch ($_SESSION['receiver']){
+ case "Taler":
+ $news = "https://taler.net/about";
+ break;
+ case "GNUnet":
+ $news = "https://gnunet.org/";
+ break;
+ case "Tor":
+ $news = "https://www.torproject.org/press/press.html.en";
+ break;
+ }
+ echo generate_msg ($news);
+}
?>