Exemple #1
0
 /// <summary>
 /// 初始化支付宝参数生成器
 /// </summary>
 /// <param name="config">配置</param>
 public AlipayParameterBuilder(AliPayConfig config)
 {
     config.CheckNull(nameof(config));
     Config   = config;
     _builder = new UrlParameterBuilder();
     Content  = new AlipayContentBuilder();
 }
Exemple #2
0
 /// <summary>
 /// 初始化微信支付结果
 /// </summary>
 /// <param name="configProvider">配置提供器</param>
 /// <param name="response">xml响应消息</param>
 public AlipayResult(AliPayConfig aliPayConfig, string response, HttpRequest httpRequest = null)
 {
     aliPayConfig.CheckNull(nameof(aliPayConfig));
     _aliPayConfig = aliPayConfig;
     Raw           = response;
     Resolve(response);
     Request = httpRequest;
 }
 /// <summary>
 /// 验证
 /// </summary>
 protected void Validate(AliPayConfig config, TPayParam param)
 {
     config.CheckNull(nameof(config));
     param.CheckNull(nameof(param));
     config.Validate();
     param.Validate();
     ValidateParam(param);
 }