<%@ Page language="c#" AutoEventWireup="true" %>

<%@import namespace="com.yeepay.bean" %>
<%@import namespace="com.yeepay.bank" %>

<script Language="C#" runat="server">
public string ResponseString = "";	
private void Page_Load(object sender, System.EventArgs e)
{
	// 在此处放置用户代码以初始化页面
	// 设置 Response编码格式为GB2312
	//Response.ContentEncoding = System.Text.Encoding.GetEncoding("gb2312");
	Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8");
	
	string pb_TrxId = Request.Form["pb_TrxId"];
	string p3_Amt = Request.Form["p3_Amt"];
	string p4_Cur = Request.Form["p4_Cur"];
	string p5_Desc = Request.Form["p5_Desc"];
    
	try
	{
		BuyRefundOrdResult result = Buy.RefundOrd(pb_TrxId, p3_Amt, p4_Cur, p5_Desc);

		if (result.R1_Code == "1")
		{
			//退款操作，操作完成后，显示操作结果。
			ResponseString = ("退款成功");
			ResponseString+=("<br>退款金额:" + result.R3_Amt);
		}
		else
		{
			ResponseString = ("退款失败 " + result.R1_Code);//本地不作处理。
		}
	}
	catch (Exception ex)
	{
		ResponseString = (ex.ToString());
	}
}

</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>Refund</title>
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="Form1" >
			<FONT face="宋体"><%=ResponseString%></FONT>
		</form>
	</body>
</HTML>
