<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, OPTIONS');
header('Access-Control-Max-Age: 1000');
header('Access-Control-Allow-Headers: Content-Type');
require_once('../lib/dbclass.php');

extract($_POST);
$data = $_REQUEST;



$orderidid       = $_REQUEST['order_id'];
$transid         = $_REQUEST['transid'];
$order_date_time = $_REQUEST['order_date_time'];

$datas = findQuery("SELECT * FROM tbl_transaction WHERE orderid='$orderidid'");



if ($datas) {
    updateQuery("update tbl_transaction set Transid='$transid',Received=Amount,dateadded='$order_date_time' WHERE orderid='$orderidid'");



    $message = 'True';
    $data2   = 0;
    echo json_encode(['Status' => $message, 'data' => $data2]);
} else {
    $message = 'False';
    $data2   = 0;
    echo json_encode(['Status' => $message, 'data' => $data2]);

    return;
}














return;
?>	   


