using System.Collections.Generic; using PaySharp.Core.Response; using PaySharp.Core.Utils; namespace PaySharp.Core.Request { public abstract class Request where TResponse : IResponse { protected Request() { GatewayData = new GatewayData(); } protected Request(IComparer comparer) { GatewayData = new GatewayData(comparer); } /// /// 请求地址 /// public string RequestUrl { get; set; } /// /// 异步通知地址 /// public string NotifyUrl { get; set; } /// /// 同步通知地址 /// public string ReturnUrl { get; set; } /// /// 网关数据 /// /// public GatewayData GatewayData { get; } /// /// 模型 /// /// public TModel Model { get; private set; } /// /// 添加网关数据 /// /// 模型 public virtual void AddGatewayData(TModel model) { Model = model; ValidateUtil.Validate(model, null); } } }