diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-01-25 18:40:40 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-01-25 18:40:40 +0100 |
commit | e015708c602441b090ceb563ec38d3ad16134f7b (patch) | |
tree | 25061410f41d588b44d17b7a64c946aa29b09d3c /src/frontend/pay.php | |
parent | 9f87ec5e8e1c549f46f9577c8b67c3315b88edd4 (diff) | |
download | merchant-e015708c602441b090ceb563ec38d3ad16134f7b.tar.gz merchant-e015708c602441b090ceb563ec38d3ad16134f7b.tar.bz2 merchant-e015708c602441b090ceb563ec38d3ad16134f7b.zip |
modify session state correctly
Diffstat (limited to 'src/frontend/pay.php')
-rw-r--r-- | src/frontend/pay.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/frontend/pay.php b/src/frontend/pay.php index a517271a..5a028363 100644 --- a/src/frontend/pay.php +++ b/src/frontend/pay.php @@ -32,10 +32,9 @@ if (empty($hc)) session_start(); -$payments = get($_SESSION['payments'], array()); -$my_payment = get($payments[$hc]); +$payments = &pull($_SESSION, 'payments', array()); -if (null === $my_payment) +if (!isset($payments[$hc]) { http_response_code(400); echo json_encode(array( @@ -44,6 +43,8 @@ if (null === $my_payment) return; } +$my_payment = &$payments[$hc]; + $post_body = file_get_contents('php://input'); $now = new DateTime('now'); |