public StoreService(IStoreModule storeApi, IStorefrontMemoryCache memoryCache, IApiChangesWatcher apiChangesWatcher, IPaymentModule paymentModule, ITaxModule taxModule)
 {
     _storeApi          = storeApi;
     _memoryCache       = memoryCache;
     _apiChangesWatcher = apiChangesWatcher;
     _paymentModule     = paymentModule;
     _taxModule         = taxModule;
 }
示例#2
0
 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;
     }
 }
示例#3
0
        /// <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);
        }
示例#4
0
        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;
            }
        }
示例#5
0
 public PaymentModuleTest()
 {
     _paymentModule = new PaymentModule(null, PaymentUrl);
 }