<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
require_once "../lib/DzPay.Api.php";
require_once "DzPay.BarcodePay.php";

if(isset($_REQUEST["AuthCode"]) && $_REQUEST["AuthCode"] != ""){
	$auth_code = $_REQUEST["AuthCode"];
	$input = new AliBarcode();
	$input->SetAuthCode($auth_code);
    $input->SetProductName("测试样例");
    $input->SetProductDescription('刷卡');
    $input->SetAmount("0.01");
    $input->SetMerchantOrderNo(date("YmdHis"));
    
	$microPay = new BarcodePay();
    $microPay->pay($input);
    exit();
}

?>
<body>  
	<form action="#" method="post">
        <div style="margin-left:2%;">商品描述：</div><br/>
        <input type="text" style="width:96%;height:35px;margin-left:2%;" readonly value="刷卡测试样例-支付"/><br /><br />
        <div style="margin-left:2%;">支付金额：</div><br/>
        <input type="text" style="width:96%;height:35px;margin-left:2%;" readonly value="1分"/><br /><br />
        <div style="margin-left:2%;">授权码：</div><br/>
        <input type="text" style="width:96%;height:35px;margin-left:2%;" name="AuthCode" /><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>