summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/frontend/checkout.php1
-rw-r--r--src/frontend/fulfillment.php6
-rw-r--r--src/frontend/generate_taler_contract.php11
3 files changed, 11 insertions, 7 deletions
diff --git a/src/frontend/checkout.php b/src/frontend/checkout.php
index f0394bd7..5168e91a 100644
--- a/src/frontend/checkout.php
+++ b/src/frontend/checkout.php
@@ -56,7 +56,6 @@
// create PHP session and store donation information in session
$donation_fraction = (float) ("0." . $donation_fraction);
session_start();
- session_unset();
$_SESSION['receiver'] = $donation_receiver;
$_SESSION['amount_value'] = (int) $donation_amount;
$_SESSION['amount_fraction'] = (int) ($donation_fraction * 1000000);
diff --git a/src/frontend/fulfillment.php b/src/frontend/fulfillment.php
index b7ca7f22..43517709 100644
--- a/src/frontend/fulfillment.php
+++ b/src/frontend/fulfillment.php
@@ -37,7 +37,9 @@
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/>
-*/
+ */
+
+include '../frontend_lib/util.php';
function generate_msg ($link){
$msg = "<p>Thanks for donating to " . $_SESSION['receiver'] . ".</p>";
@@ -46,8 +48,6 @@ function generate_msg ($link){
return $msg;
}
-
-include '../frontend_lib/util.php';
$hc = get($_GET["uuid"]);
if (empty($hc))
diff --git a/src/frontend/generate_taler_contract.php b/src/frontend/generate_taler_contract.php
index c405e818..cd708ad3 100644
--- a/src/frontend/generate_taler_contract.php
+++ b/src/frontend/generate_taler_contract.php
@@ -15,7 +15,7 @@
TALER; see the file COPYING. If not, If not, see <http://www.gnu.org/licenses/>
*/
-include 'util.php';
+include '../frontend_lib/util.php';
session_start();
@@ -26,7 +26,6 @@ if (!isset($_SESSION['receiver']))
}
$receiver = $_SESSION['receiver'];
-$receiver = $_SESSION['receiver'];
$amount_value = intval($_SESSION['amount_value']);
$amount_fraction = intval($_SESSION['amount_fraction']);
$currency = $_SESSION['currency'];
@@ -143,7 +142,13 @@ if ($status_code != 200)
else
{
$got_json = json_decode($resp->body->toString(), true);
- $_SESSION['H_contract'] = $got_json["H_contract"];
+ $hc = $got_json["H_contract"];
+ $payments = get($_SESSION['payments'], array());
+ $payments[$hc] = array(
+ 'receiver' => $receiver,
+ );
+ $_SESSION['payments'] = $payments;
+
echo json_encode ($got_json, JSON_PRETTY_PRINT);
}
?>