aboutsummaryrefslogtreecommitdiff
path: root/src/frontend_blog/essay_fulfillment.php
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2016-02-19 16:04:57 +0100
committerMarcello Stanisci <marcello.stanisci@inria.fr>2016-02-19 16:04:57 +0100
commit0113b8eabb1f833bc8953384179da450876144e5 (patch)
tree8fd41a92203b5578a48dc4fcac4e4b573d81ce7b /src/frontend_blog/essay_fulfillment.php
parent652332ea48f6e8160cd10c690755a0c38a0ae3ef (diff)
fixing the "state" problem
Diffstat (limited to 'src/frontend_blog/essay_fulfillment.php')
-rw-r--r--src/frontend_blog/essay_fulfillment.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/frontend_blog/essay_fulfillment.php b/src/frontend_blog/essay_fulfillment.php
index ce7497a3..7c0b4538 100644
--- a/src/frontend_blog/essay_fulfillment.php
+++ b/src/frontend_blog/essay_fulfillment.php
@@ -28,10 +28,11 @@
session_start();
$payments = get($_SESSION['payments'], array());
$my_payment = get($payments[$article]);
+ log_string("ffil " . article_state_to_str($my_payment));
$pay_url = url_rel("essay_pay.php");
$offering_url = url_rel("essay_offer.php", true);
$offering_url .= "?article=$article";
- if ("payed" != $my_payment || null === $my_payment){
+ if (false == $my_payment['ispayed'] || null === $my_payment){
$tid = get($_GET['tid']);
$timestamp = get($_GET['timestamp']);
// 1st time
@@ -66,12 +67,12 @@
die();
}
$hc = json_decode($resp->body->toString(), true)['H_contract'];
+ $my_payment['hc'] = $hc;
$js_code = "executePayment('$hc', '$pay_url', '$offering_url')";
$cc_page = template("./essay_cc-form.html", array('article' => $article, 'jscode' => $js_code));
echo $cc_page;
return;
}
-
// control here == article payed
$article = get_article($article);
echo $article;