/// <summary> /// 初始化支付宝参数生成器 /// </summary> /// <param name="config">配置</param> public AlipayParameterBuilder(AlipayConfig config) { config.CheckNull(nameof(config)); Config = config; _builder = new UrlParameterBuilder(); Content = new AlipayContentBuilder(); }
/// <summary> /// 初始化支付宝参数生成器 /// </summary> /// <param name="config">配置</param> /// <param name="param">参数</param> public AlipayParameterBuilder(AlipayConfig config, PayParamBase param = null) { config.CheckNull(nameof(config)); Config = config; _builder = new UrlParameterBuilder(); Content = new AlipayContentBuilder(); Init(param); }
/// <summary> /// 设置内容 /// </summary> /// <param name="builder">内容参数生成器</param> public AlipayParameterBuilder Content(AlipayContentBuilder builder) { return(Content(builder.ToJson())); }