using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Infrastructure.WeChat.TenPay { public class PayParameters { /// /// 小程序ID /// public string appid { get { return "wx5e6ee16752b633c4"; } } /// /// 附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用 /// public string attach { get { return "支付测试"; } } /// /// 商户号 /// public string mchid { get { return "1632347502"; } } /// /// 随机字符串,长度要求在32位以内。推荐随机数生成算法 /// public string nonce { get { return Senparc.Weixin.MP.Helpers.JSSDKHelper.GetNoncestr(); } } /// /// 异步接收微信支付结果通知的回调地址,通知url必须为外网可访问的url,不能携带参数。 /// public string notify_url { get { return "https://192.168.1.102/api/weiXinPay/Notify"; } } /// /// 商品简单描述,该字段请按照规范传递,具体请见参数规定 /// public string body { get { return "JSAPI支付测试"; } } /// /// 商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*且在同一个商户号下唯一。详见商户订单号 /// public string out_trade_no { get; set; } /// /// 支持IPV4和IPV6两种格式的IP地址。调用微信支付API的机器IP /// public string spbill_create_ip { get { return "192.168.1.102"; } } /// /// 订单总金额,单位为分,详见支付金额 /// public int total_fee { get { return 10; } } /// /// 小程序取值如下:JSAPI,详细说明见参数规定 /// public string trade_type { get { return "JSAPI"; } } /// /// 交易过程生成签名的密钥,仅保留在商户系统和微信支付后台, /// 不会在网络中传播。商户妥善保管该Key,切勿在网络中传输, /// 不能在其他客户端中存储,保证key不会被泄漏。商户可根据邮件 /// 提示登录微信商户平台进行设置。也可按以下路径设置: /// 微信商户平台(pay.weixin.qq.com)-->账户设置-->API安全-->密钥设置 /// public string key { get { return "oDjIVWvPHBmjo5fH6p1q5ZkWEcJfKWfT"; } } /// /// AppSecret是APPID对应的接口密码,用于获取接口调用凭证时使用 /// public string secret { get { return "233a99954667ccfd6697dd3d31743fde"; } } /// /// 是否需要分账 Y-是,需要分账 N-否,不分账 字母要求大写,不传默认不分账 /// public string profit_sharing { get; set; } } }