merchant

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

commit b78bb1901b88b9d24ea2c70ed20fc5ee1cb1f03e
parent 7bf824d44bb9156211fc64e8224a1d4403856d54
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Wed, 14 Oct 2015 16:44:14 +0200

KUDOS works

Diffstat:
Msrc/frontend/checkout.php | 3+++
Msrc/frontend/generate_taler_contract.php | 8+++-----
Msrc/frontend/index.html | 1+
3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/frontend/checkout.php b/src/frontend/checkout.php @@ -46,11 +46,14 @@ // get the donation information from form $donation_receiver = $_POST['donation_receiver']; $donation_amount = $_POST['donation_amount']; + $donation_currency = $_POST['donation_currency']; // create PHP session and store donation information in session session_start(); $_SESSION['receiver'] = $donation_receiver; $_SESSION['amount'] = $donation_amount; + $_SESSION['currency'] = $donation_currency; + echo $donation_currency; ?> <form name="tform" action="" method="POST"> diff --git a/src/frontend/generate_taler_contract.php b/src/frontend/generate_taler_contract.php @@ -23,9 +23,8 @@ 2. generate the JSON to forward to the backend 3. forward the response with the contract from the backend to to the wallet -*/ - -$cli_debug = !TRUE; +*/ +$cli_debug = false; // 1) recover the session information session_start(); @@ -43,6 +42,7 @@ if (!$cli_debug) { $receiver = $_SESSION['receiver']; $amount = intval ($_SESSION['amount']); + $currency = $_SESSION['currency']; } else { @@ -66,8 +66,6 @@ $desc = "Donation to " . $receiver; $value = $amount; // We don't have a fraction. $fraction = 0; -// This is our 'toy' currency -$currency = "EUR"; // NOTE: mint does NOT generate KUDOS denom. keys // The tax for this deal $teatax = array ('value' => 1, 'fraction' => 0, diff --git a/src/frontend/index.html b/src/frontend/index.html @@ -117,6 +117,7 @@ <option value="1">1 KUDOS</option> <option value="6">5 KUDOS (*)</option> <option value="10">10 KUDOS</option> + <input type="hidden" name="donation_currency" value="KUDOS"></input> </select> <input type="submit" name="keyName" value="Donate!"> <br>