<?php
$id = $session->get('order_id');
//$func->prnt($id,true);
$order_info = $db->query("SELECT * FROM " . DBPREFIX . "order WHERE id = '".$id."'");
if($order_info->num_rows) {
    $db->query("UPDATE " . DBPREFIX . "order SET status='2', order_status='2' WHERE id = '" . $id . "'");
    $location->redirect('success');
}else{
    $error->set('Sipariş bulunamadı!');
    $location->redirect('payment');
}