<?php
//error_reporting(E_ERROR | E_PARSE);
session_start();
require '../Firebase/JWT/JWT.php';
$location = "../uploads/json/";
if (!file_exists($location)) {
    mkdir($location, 0777, true);
}
if(isset($_FILES['file'])){
    $filename = $_FILES['file']['name'];
    $filesize = $_FILES['file']['size'];    
    $location = $location.$filename;
    if(move_uploaded_file($_FILES['file']['tmp_name'],$location)){
        $string = file_get_contents($location);
        $data = json_decode($string, true);

        $AckNo = $data['AckNo'];
        $AckDt = $data['AckDt'];
        $Irn = $data['Irn'];
        $SignedInvoice = $data['SignedInvoice'];
        $SignedQRCode = $data['SignedQRCode'];
        $Status = $data['Status'];
        $EwbNo = $data['EwbNo'];
        $EwbDt = $data['EwbDt'];
        $EwbValidTill = $data['EwbValidTill'];
        $Remarks = $data['Remarks'];
        
        
        

    }
}


function Pr_DecryptKey(){
    $key = "-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArxd93uLDs8HTPqcSPpxZrf0
Dc29r3iPp0a8filjAyeX4RAH6lWm9qFt26CcE8ESYtmo1sVtswvs7VH4Bjg/FDlRpd+MnAlX
uxChij8/vjyAwE71ucMrmZhxM8rOSfPML8fniZ8trr3I4R2o4xWh6no/xTUtZ02/yUEXbphw3
DEuefzHEQnEF+quGji9pvGnPO6Krmnri9H4WPY0ysPQQQd82bUZCk9XdhSZcW/am8w
BulYokITRMVHlbRXqu1pOFmQMO5oSpyZU3pXbsx+OxIOc4EDX0WMa9aH4+snt18WA
XVGwF2B4fmBk7AtmkFzrTmbpmyVqA3KO2IjzMZPw0hQIDAQAB
-----END PUBLIC KEY-----";
return $key;
}
?>