<?php
require ($_SERVER['DOCUMENT_ROOT'].'/core/sys.php');
/*Перенаправляем*/
$id = abs(intval($_SESSION['qiwi']));
$pay = $db->prepare('SELECT * FROM `pay` WHERE `id` = ?');
$pay -> execute([$_SESSION['payment']]);
$pay = $pay -> fetch(PDO :: FETCH_ASSOC);
/*Присваиваем статус */
$sql = $db->prepare('UPDATE `pay` SET `status` = ? WHERE `id` = ?');
$sql -> execute(['success',$pay['id']]);
/*END*/
header('Location: /api/payment/success.php');
exit;