예제 #1
0
        public override void Process()
        {
            EpayFactory epayFactory = new EpayFactory();
            Epay        epay        = epayFactory.CreatEpay("PayPal");

            epay.Process();
            //处理支付宝平台
            epay = epayFactory.CreatEpay("AliPay");
            epay.Process();
        }
예제 #2
0
        public Epay CreatEpay(string epayType)
        {
            Epay epay = null;

            switch (epayType)
            {
            case "Paypal": epay = new PayPal();
                break;

            case "Alipay": epay = new Alipay();
                break;

            default: break;
            }

            return(epay);
        }