summaryrefslogtreecommitdiff
path: root/src/frontend_blog/essay_cc_pay.php
blob: 90cd080f58bf85ccf01956239663f77c2d87cc5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
session_start();
if (!$_SESSION['cc_payment'])
{
  echo "No session active";
  die();
}
$article = $_GET['article'];
$_SESSION['payment_ok'] = true;
if (!isset($_SESSION['allowed_articles']))
  $_SESSION['allowed_articles'] = array ($article => true);
else $_SESSION['allowed_articles'] = array_merge($_SESSION['allowed_articles'], array ($article => true));
http_response_code (301);
$url =  'http://' . $_SERVER['HTTP_HOST'] . "/essay_fulfillment.php?article=$article";
header("Location: " . $url);
echo $url;
die();
?>