merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 71bcb3db6d7bf5ddc80c9f011a80062273528988
parent 2393fbf60dd599e6d00b4b6b99187b39e8e1dd25
Author: Florian Dold <florian.dold@gmail.com>
Date:   Mon,  1 Feb 2016 14:12:18 +0100

show donation receiver correctly

Diffstat:
Msrc/frontend/fulfillment.php | 19+++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/frontend/fulfillment.php b/src/frontend/fulfillment.php @@ -52,14 +52,6 @@ include '../frontend_lib/util.php'; -function generate_msg ($link) -{ - $msg = "<p>Thanks for donating to " . $_SESSION['receiver'] . ".</p>"; - if (false != $link) - $msg .= "<p>Check our latest <a href=\"" . $link . "\">news!</a></p>"; - return $msg; -} - $hc = get($_GET["uuid"]); if (empty($hc)) @@ -93,8 +85,10 @@ if (true !== get($my_payment["is_payed"], false)) return; } +$receiver = $my_payment["receiver"]; + $news = false; -switch ($_SESSION['receiver']) +switch ($receiver) { case "Taler": $news = "https://taler.net/news"; @@ -106,7 +100,12 @@ switch ($_SESSION['receiver']) $news = "https://www.torproject.org/press/press.html.en"; break; } -echo generate_msg($news); + +$msg = "<p>Thanks for donating to " . $receiver . ".</p>"; +if (false != $link) + $msg .= "<p>Check our latest <a href=\"" . $link . "\">news!</a></p>"; + +echo $msg; ?> </article>