public static IProcessOrder GetPaymentMethod(PaymentFor type)
        {
            IProcessOrder _processOrder = null;

            switch (type)
            {
            case PaymentFor.PHYSICALPRODUCT:
                _processOrder = new PhysicalProductPayment();
                break;

            case PaymentFor.BOOK:
                _processOrder = new BookPayment();
                break;

            case PaymentFor.BOOKORPHYSICAL:
                _processOrder = new PhysicalorBookPayment();
                break;

            case PaymentFor.VIDEO:
                _processOrder = new VideoPayment();
                break;

            default:
                break;
            }
            return(_processOrder);
        }
Exemplo n.º 2
0
        public static IProcessOrder GetPaymentMethod(PaymentType type)
        {
            IProcessOrder _processOrder = null;

            switch (type)
            {
            case PaymentType.PHYSICAL_PRODUCT:
                _processOrder = new PhysicalProductPayment();
                break;

            case PaymentType.BOOK:
                _processOrder = new BookPayment();
                break;

            case PaymentType.BOOKORPHYSICAL:
                _processOrder = new PhysicalorBookPayment();
                break;

            case PaymentType.VIDEO:
                _processOrder = new VideoPayment();
                break;

            case PaymentType.MEMBERSHIP:
                _processOrder = new MemberShipPayment();
                break;

            default:
                break;
            }
            return(_processOrder);
        }