Files
g.hnyhua.cn/Mtxfw.Utility/AlipayConfig.cs
2026-02-07 15:48:27 +08:00

91 lines
2.7 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.Web;
using System.Text;
using System.IO;
using System.Net;
using System;
using System.Collections.Generic;
namespace Mtxfw.Utility
{
/// <summary>
/// 类名Config
/// 功能:基础配置类
/// 详细:设置帐户有关信息及返回路径
/// 版本3.3
/// 日期2012-07-05
/// 说明:
/// 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
/// 该代码仅供学习和研究支付宝接口使用,只是提供一个参考。
///
/// 如何获取安全校验码和合作身份者ID
/// 1.用您的签约支付宝账号登录支付宝网站(www.alipay.com)
/// 2.点击“商家服务”(https://b.alipay.com/order/myOrder.htm)
/// 3.点击“查询合作者身份(PID)”、“查询安全校验码(Key)”
/// </summary>
public class AlipayConfig
{
#region
private static string partner = "";
private static string key = "";
private static string input_charset = "";
private static string sign_type = "";
#endregion
static AlipayConfig()
{
//↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
//合作身份者ID以2088开头由16位纯数字组成的字符串
partner = "2088221258130033";
//交易安全检验码由数字和字母组成的32位字符串
key = "wlkrys36bcq1f803nqun4252ussrnosq";
//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
//字符编码格式 目前支持 gbk 或 utf-8
input_charset = "gb2312";
//签名方式选择项RSA、DSA、MD5
sign_type = "MD5";
}
#region
/// <summary>
/// 获取或设置合作者身份ID
/// </summary>
public static string Partner
{
get { return partner; }
set { partner = value; }
}
/// <summary>
/// 获取或设交易安全校验码
/// </summary>
public static string Key
{
get { return key; }
set { key = value; }
}
/// <summary>
/// 获取字符编码格式
/// </summary>
public static string Input_charset
{
get { return input_charset; }
}
/// <summary>
/// 获取签名方式
/// </summary>
public static string Sign_type
{
get { return sign_type; }
}
#endregion
}
}