coding.Unicode.GetString(bytes, 0, i);
}
#endregion
}
}
Md5pay.cs (转载自财付通接口实例)
using System;
using System.Text;
using System.Security.Cryptography;
using System.Collections.Specialized;
using System.Configuration;
using System.Web.UI;
using System.Web;
namespace Help
{
/// <summary>
/// 完成功能如下
/// 1:支付请求
/// 2:支付结果处理。
/// 3:查询订单请求.
/// 4:查询订单结果处理.
/// </summary>
public class Md5Pay
{
/// <summary>
/// 参数附值,很多参数附值后并不能传给财付通前台验证
/// 这里只是给予一个参照.
/// </summary>
private string chnid = ConfigurationSettings.AppSettings["bargainor_id"];
//平台提供者的财付通账号
public string Chnid
{
get { return chnid; }
set { chnid = value; }
}
private int cmdno = 12;
//任务代码,暂定值:12
public int Cmdno
{
get { return cmdno; }
set { cmdno = value; }
}
private int encode_type = 1;
//1:GB2312编码,默认为GB2312编码。2:UTF-8编码。
public int Encode_type
{
get { return encode_type; }
set { encode_type = value; }
}
private string mch_desc = "测试交易描述";
//交易说明,不能包含<>’”%特殊字符
public string Mch_desc
{
get { return mch_desc; }
set { mch_desc = value; }
|