Exemplo n.º 1
0
 /// <summary>
 /// 初始化微信支付参数生成器
 /// </summary>
 /// <param name="config">配置</param>
 public WechatPayParameterBuilder(WechatPayConfig config, HttpRequest httpRequest = null)
 {
     config.CheckNull(nameof(config));
     Config  = config;
     Builder = new ParameterBuilder();
     Request = httpRequest;
 }
Exemplo n.º 2
0
 /// <summary>
 /// 初始化微信支付结果
 /// </summary>
 /// <param name="configProvider">配置提供器</param>
 /// <param name="response">xml响应消息</param>
 public WechatPayResult(WechatPayConfig wechatPayConfig, string response, HttpRequest httpRequest = null)
 {
     wechatPayConfig.CheckNull(nameof(wechatPayConfig));
     _wechatPayConfig = wechatPayConfig;
     Raw     = response;
     Request = httpRequest;
 }
Exemplo n.º 3
0
 /// <summary>
 /// 验证
 /// </summary>
 protected void Validate(WechatPayConfig config, TPayParam param)
 {
     config.CheckNull(nameof(config));
     param.CheckNull(nameof(param));
     config.Validate();
     param.Validate();
     ValidateParam(param);
 }