第三方支付接口(原)
2007-03-24 12:27
267 查看
一个英属处女岛上的支接口
代码:
string inv;
string acctNo;
string curr;
string amount;
string status;
string ssn;
//read post from PayNetCom system
//post back to PayNetCom system to validate
MSXML2.XMLHTTP _xmlhttp = new MSXML2.XMLHTTPClass();
_xmlhttp.open("Post", "https://www.click-pay.com/cp/verifySign.do", false, null, null);
_xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
_xmlhttp.send(Request.Form.ToString());
// assign posted variables to local variables
inv = Request.Form["inv"];
acctNo = Request.Form["acctNo"];
curr = Request.Form["curr"];
amount = Request.Form["amount"];
status = Request.Form["status"];
ssn = Request.Form["ssn"];
//Check notification validation
if (_xmlhttp.status != 200)
{
//HTTP error handling
//交易失败(通信故障)
Response.Redirect("info.aspx?code=1006&back=deposit.aspx");
}
else if (_xmlhttp.responseText == "VERIFIED")
{
//check that inv is success
//check that acctNo ount are correct
if (_xmlhttp.status == 000)
{
//process payment
//充值成功
//增加金额
int mid = Convert.ToInt32(acctNo);
decimal momey = Convert.ToDecimal(amount);
MDAO.UpdateMemberMoneyById(mid, momey);
//设置为充值成功
//存款记录ID
int id = Convert.ToInt32(inv);
DRDAO.updateSuccess(id);
//增加财务记录
fbean.MemberId = mid;
fbean.FinanceDatetime = DateTime.Now.ToString();
fbean.OperationType = "银行充值";
fbean.Detail = "充值记录号" + id;
fbean.AccountChange = momey;
FDAO.Insert(fbean);
Response.Redirect("deposit.aspx");
}
else if (_xmlhttp.status == 111)
{
//用户名或密码不正确
Response.Redirect("info.aspx?code=1003&back=deposit.aspx");
}
else
{
Response.Redirect("info.aspx?code=1003&back=deposit.aspx");
}
}
else if (_xmlhttp.responseText == "NOT_VERIFIED")
{
//log for manual investigation
Response.Redirect("info.aspx?code=1007&back=deposit.aspx");
}
else
{
//error
Response.Redirect("info.aspx?code=1003&back=deposit.aspx");
}
_xmlhttp.abort();
//
代码:
string inv;
string acctNo;
string curr;
string amount;
string status;
string ssn;
//read post from PayNetCom system
//post back to PayNetCom system to validate
MSXML2.XMLHTTP _xmlhttp = new MSXML2.XMLHTTPClass();
_xmlhttp.open("Post", "https://www.click-pay.com/cp/verifySign.do", false, null, null);
_xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
_xmlhttp.send(Request.Form.ToString());
// assign posted variables to local variables
inv = Request.Form["inv"];
acctNo = Request.Form["acctNo"];
curr = Request.Form["curr"];
amount = Request.Form["amount"];
status = Request.Form["status"];
ssn = Request.Form["ssn"];
//Check notification validation
if (_xmlhttp.status != 200)
{
//HTTP error handling
//交易失败(通信故障)
Response.Redirect("info.aspx?code=1006&back=deposit.aspx");
}
else if (_xmlhttp.responseText == "VERIFIED")
{
//check that inv is success
//check that acctNo ount are correct
if (_xmlhttp.status == 000)
{
//process payment
//充值成功
//增加金额
int mid = Convert.ToInt32(acctNo);
decimal momey = Convert.ToDecimal(amount);
MDAO.UpdateMemberMoneyById(mid, momey);
//设置为充值成功
//存款记录ID
int id = Convert.ToInt32(inv);
DRDAO.updateSuccess(id);
//增加财务记录
fbean.MemberId = mid;
fbean.FinanceDatetime = DateTime.Now.ToString();
fbean.OperationType = "银行充值";
fbean.Detail = "充值记录号" + id;
fbean.AccountChange = momey;
FDAO.Insert(fbean);
Response.Redirect("deposit.aspx");
}
else if (_xmlhttp.status == 111)
{
//用户名或密码不正确
Response.Redirect("info.aspx?code=1003&back=deposit.aspx");
}
else
{
Response.Redirect("info.aspx?code=1003&back=deposit.aspx");
}
}
else if (_xmlhttp.responseText == "NOT_VERIFIED")
{
//log for manual investigation
Response.Redirect("info.aspx?code=1007&back=deposit.aspx");
}
else
{
//error
Response.Redirect("info.aspx?code=1003&back=deposit.aspx");
}
_xmlhttp.abort();
//
相关文章推荐
- 第三方支付接口搜集(附下载)
- 第三方支付接口,银行接口
- 网站如何调用第三方支付接口
- 第三方支付接口的技术比较研究
- 第三方支付接口,银行接口(附下载),third party bank interface
- 第三方支付接口,银行接口(附下载),third party bank interface
- 第三方支付平台:微信支付接口
- 第三方登录、支付接口本地代码调试方法
- 第三方支付接口,银行接口(附下载),third party bank interface
- java第三方支付接口(云通付)
- java 支付宝 第三方即时到账支付 接口
- java写第三方支付接口
- java 支付宝 第三方即时到账支付 接口
- java 支付宝 第三方即时到账支付 接口
- 第三方支付平台接口概述
- 第三方支付接口搜集
- 说说第三方支付接口开发及开发中遇到的坑爹问题
- 第三方支付接口搜集(附下载)
- 正规第三方支付接口的重要性,安全、稳定还是第一位的!
- 电商平台接入第三方支付接口之微信支付接入订单系统