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

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