资源简介
IPS 环迅在线支付7.0接口
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender EventArgs e)
{
}
protected void Button1_Click(object sender EventArgs e)
{
#region 环迅支付
//提交地址
string form_url = “https://newpay.ips.com.cn/psfp-entry/gateway/payment.do“;//网关地址
string Mer_code = “000“;//商户号
string Account = “000“;//登录商户系统首页去找
string pMerCert = “1111“;//MD5
//商户订单编号
string MerBillNo = DateTime.Now.ToString(“yyyyMMddHHmmss“);
//订单金额(保留2位小数)
string payMoney =“0.1“;//支付金额
//订单日期
string ReqDate = DateTime.Now.ToString(“yyyyMMddHHmmss“);
//支付结果成功返回的商户URL
string Merchanturl =“/1111.aspx“;
//支付结果失败返回的商户URL
string FailUrl =“/22.aspx“;
string ServerUrl =“1“; //异步
//返回方式
string Rettype = Request.Form[“Rettype“];
string pDate=DateTime.Now.ToString(“yyyyMMdd“);
string pMerchanturl=“/de.aspx“;//通知页面
//请求报文的消息体
string strbodyxml= ““;
strbodyxml += ““ + MerBillNo + “ “;//
strbodyxml += ““ + payMoney + “ “;//
strbodyxml+= ““+pDate+“ “;//
strbodyxml+= “156 “;//
strbodyxml+= “01 “;//
strbodyxml+= “GB “;//
strbodyxml += ““ + Merchanturl + “ “;//
strbodyxml+= “ “;//
strbodyxml+= ““+pMerchanturl+“ “;//
strbodyxml+= “5 “;//
strbodyxml+= “17 “;//
strbodyxml+= “1 “;//
strbodyxml+= ““+ServerUrl+“ “;//
strbodyxml+= “24 “;//
strbodyxml+= “游戏币 “;//
strbodyxml+= “ “;//
strbodyxml+= “ “;//
strbodyxml+= “ “;//
strbodyxml+= ““;
string Sign = strbodyxml + Mer_code + pMerCert;//对……节点字符串+商户号+商户数字证书迚行签名
string MsgId=new Random().Next(1111111199999999).ToString();
//$pSignature = md5($strbodyxml.$pMerCode.$pMerCert);//数字签名
string pSignature= System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(Sign “MD5“).ToLower();;//数字签名
//请求报文的消息头
string strheaderxml= ““;
strheaderxml+= “v1.0.0 “;//
strheaderxml += ““ + Mer_code + “ “;//商户号
strheaderxml+= “
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 561 2016-07-18 11:08 Default.aspx
文件 4245 2016-08-03 17:19 Default.aspx.cs
文件 1755 2016-08-03 17:17 localhost_1823.sln
文件 8195 2016-07-18 10:28 Web.config
目录 0 2016-08-03 14:49 Bin
----------- --------- ---------- ----- ----
14756 5
- 上一篇:ANSYS中常用的APDL语言详解!
- 下一篇:CentOS7.txt
评论
共有 条评论