<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1" /> 
    <title>点缀支付样例-订单关闭</title>
</head>
<?php
ini_set('date.timezone','Asia/Shanghai');
require_once "../lib/DzPay.Api.php";


if(isset($_REQUEST["merchantOrderNo"]) && $_REQUEST["merchantOrderNo"] != ""){
    $input = new Close();
	$merchantOrderNo = $_REQUEST["merchantOrderNo"];
    $input->SetMerchantOrderNo($merchantOrderNo);

    $pay = new Pay();
    $result = $pay->Close($input);
    if($result->GetSuccess())
    {
        echo '关闭成功';
    }
    else
    {
        echo $result->GetData("RespMessage");
    }
    exit();
}
?>
<body>  
	<form action="#" method="post">
        <div style="margin-left:2%;">商户订单号：</div><br/>
        <input type="text" style="width:96%;height:35px;margin-left:2%;" name="merchantOrderNo" /><br /><br />
		<div align="center">
			<input type="submit" value="关闭" style="width:210px; height:50px; border-radius: 15px;background-color:#FE6714; border:0px #FE6714 solid; cursor: pointer;  color:white;  font-size:16px;" type="button" />
		</div>
	</form>
</body>
</html>