<?php
$url = 'https://hamrahsharj.com/'; // full URL of g8way script

/**
******************************
* DO NOT EDIT BELLOW THIS LINE
******************************
*/
if(isset($_GET['invoice_key'])) {
    $key = $_GET['invoice_key'];
    unset($_GET['invoice_key']);
    $url .= 'invoice/processTransaction/'.$key.'/';
    if(!empty($_GET)) {
        $get_params = http_build_query($_GET);
        $url .= '?'.$get_params;
    }
    if(empty($_POST)) {
        header('location:'.$url);
        die('');
    } else {
        $fields = array();
        foreach($_POST as $key => $val) {
            $fields[] = '<input type="hidden" name="'.$key.'" value="'.$val.'"/>';
        }
        $fields = implode("\n",$fields);
    }
} else {
    die('');
}
?>
<html>
<head>
<title>در حال انتقال</title>
</head>
<body>
<form action="<?=$url;?>" method="post">
<?=$fields;?>
<input type="submit" style="display: none;">
</form>
<script type="text/javascript">
document.forms[0].submit();
</script>
</body>
</html>