public IPaymanentOrderProcessing Helper(PaymentProductType productType, RuleEngineType ruleEngineType, object inputs) { IPaymanentOrderProcessing paymanentOrderProcessing; OrderFactory factoryObj; factoryObj = PackSlipFactory.CreateProductFactory(productType); paymanentOrderProcessing = factoryObj.GetBusinessProcessingRule(ruleEngineType, inputs); return(paymanentOrderProcessing); }
public static OrderFactory CreateProductFactory(PaymentProductType productType, DepartType departType = DepartType.Other) { //create the factory object for physical and book if (productType.Equals(PaymentProductType.PhysicalProduct) || ((productType.Equals(PaymentProductType.Book) && departType.Equals(DepartType.Royality)))) { return(new PackSlipFactory()); } else if (productType.Equals(PaymentProductType.MembershipNew) || productType.Equals(PaymentProductType.MembershipUpgrade)) { return(new MembershipFactory()); } else if (productType.Equals(PaymentProductType.VideoLearning)) { return(new LearningFactory()); } else { return(null); } }