Пример #1
0
        /// <summary>
        /// 添加网关
        /// </summary>
        /// <param name="gateway">网关</param>
        /// <returns></returns>
        public bool Add(GatewayBase gateway)
        {
            if (gateway != null)
            {
                if (!Exist(gateway.Merchant.AppId))
                {
                    _list.Add(gateway);

                    return(true);
                }
                else
                {
                    throw new GatewayException("该商户数据已存在");
                }
            }

            return(false);
        }
Пример #2
0
 public PaymentSetting(GatewayType gatewayType)
 {
     gateway = CreateGateway(gatewayType);
 }
Пример #3
0
 public PaymentSetting(GatewayBase gateway)
 {
     this.gateway = gateway;
 }