public StoreService(IStoreModule storeApi, IStorefrontMemoryCache memoryCache, IApiChangesWatcher apiChangesWatcher, IPaymentModule paymentModule, ITaxModule taxModule) { _storeApi = storeApi; _memoryCache = memoryCache; _apiChangesWatcher = apiChangesWatcher; _paymentModule = paymentModule; _taxModule = taxModule; }
public void SaveModuleToMethod(IPaymentModule module, PaymentMethod method) { var serializer = new XmlSerializer(module.GetType()); using (var writer = new StringWriter()) { serializer.Serialize(writer, module); method.ModuleSettings = writer.ToString(); method.ModuleType = module.GetType().Name; } }
/// <summary> /// Creates and returns the payment module version 1. /// </summary> /// <returns> /// The Payment module V1. /// </returns> public IPaymentModule GetPaymentModule() { if (paymentModule == null) { paymentModule = new PaymentModule.PaymentModule(_configuration); Type paymentLogicType = CreateTypeFromConfiguration("PaymentModule", "PaymentLogic", "OpenImis.ModulesV1.PaymentModule.Logic.PaymentLogic"); paymentModule.SetPaymentLogic((PaymentModule.Logic.IPaymentLogic)ActivatorUtilities.CreateInstance(_serviceProvider, paymentLogicType)); } return(paymentModule); }
public void SaveModuleToMethod(IPaymentModule module, PaymentMethod method) { var serializer = new XmlSerializer(module.GetType()); using (var writer = new StringWriter()) { serializer.Serialize(writer, module); method.ModuleSettings = writer.ToString(); method.ModuleType = module.GetType().Name; } }
public PaymentModuleTest() { _paymentModule = new PaymentModule(null, PaymentUrl); }