<?php
require_once "../lib/DzPay.Api.php";

class WechatH5Pay
{
    public function pay($wechatH5PayInput)
    {
        $pay = new Pay();
        $result = $pay->Payment($wechatH5PayInput,5);
        if($result->GetSuccess())
        {
            header("Location: ".$result->GetData("ToPayData"));
            exit;
        }
        else
        {
            echo $result->GetData("RespMessage");
        }
    }
}