Ejemplo n.º 1
0
        public override void Install()
        {
            //settings
            var settings = new AliPayPaymentSettings()
            {
                SellerEmail   = "",
                Key           = "",
                Partner       = "",
                AdditionalFee = 0,
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.RedirectionTip", "You will be redirected to AliPay site to complete the order.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.SellerEmail", "Seller email");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.SellerEmail.Hint", "Enter seller email.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.Key", "Key");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.Key.Hint", "Enter key.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.Partner", "Partner");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.Partner.Hint", "Enter partner.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.AdditionalFee", "Additional fee");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.AdditionalFee.Hint", "Enter additional fee to charge your customers.");

            base.Install();
        }
Ejemplo n.º 2
0
        public PaymentAliPayController(ISettingService settingService,
                                       IPaymentService paymentService,
                                       //IOrderService orderService,
                                       //  IOrderProcessingService orderProcessingService,
                                       IWebHelper webHelper,
                                       ISiteContext siteContext,
                                       IWorkContext workContext,
                                       AliPayPaymentSettings aliPayPaymentSettings,
                                       ILocalizationService localizationService,
                                       ICommonServices services,
                                       PaymentSettings paymentSettings,
                                       ISiteService siteService)
        {
            this._settingService = settingService;
            this._paymentService = paymentService;
            // this._orderService = orderService;
            // this._orderProcessingService = orderProcessingService;
            _siteContext = siteContext;
            _workContext = workContext;

            this._webHelper             = webHelper;
            this._aliPayPaymentSettings = aliPayPaymentSettings;
            _localizationService        = localizationService;
            _services             = services;
            this._paymentSettings = paymentSettings;
            _siteService          = siteService;
        }
Ejemplo n.º 3
0
 public AliPayPaymentProcessor(AliPayPaymentSettings aliPayPaymentSettings,
                               ISettingService settingService, IWebHelper webHelper,
                               IStoreContext storeContext)
 {
     this._aliPayPaymentSettings = aliPayPaymentSettings;
     this._settingService        = settingService;
     this._webHelper             = webHelper;
     this._storeContext          = storeContext;
 }
Ejemplo n.º 4
0
 public AlipayPaymentService(ILogger logger,
                             IWebHelper webHelper,
                             IStoreContext storeContext,
                             AliPayPaymentSettings aliPayPaymentSettings,
                             IOrderProcessingService orderProcessingService)
 {
     this._logger                 = logger;
     this._webHelper              = webHelper;
     this._storeContext           = storeContext;
     this._aliPayPaymentSettings  = aliPayPaymentSettings;
     this._orderProcessingService = orderProcessingService;
 }
Ejemplo n.º 5
0
 public PaymentAliPayController(ISettingService settingService,
                                IPaymentService paymentService, IOrderService orderService,
                                IOrderProcessingService orderProcessingService,
                                ILogger logger, IWebHelper webHelper,
                                AliPayPaymentSettings aliPayPaymentSettings,
                                PaymentSettings paymentSettings)
 {
     this._settingService         = settingService;
     this._paymentService         = paymentService;
     this._orderService           = orderService;
     this._orderProcessingService = orderProcessingService;
     this._logger                = logger;
     this._webHelper             = webHelper;
     this._aliPayPaymentSettings = aliPayPaymentSettings;
     this._paymentSettings       = paymentSettings;
 }
Ejemplo n.º 6
0
 public AliPayPaymentProvider(ICurrencyService currencyService,
                              AliPayPaymentSettings aliPayPaymentSettings,
                              HttpContextBase httpContext,
                              CurrencySettings currencySettings,
                              //IOrderTotalCalculationService orderTotalCalculationService,
                              ICommonServices commonServices,
                              ILogger logger)
 {
     _currencyService  = currencyService;
     _currencySettings = currencySettings;
     //_orderTotalCalculationService = orderTotalCalculationService;
     this._aliPayPaymentSettings = aliPayPaymentSettings;
     _httpContext    = httpContext;
     _commonServices = commonServices;
     _logger         = logger;
 }
Ejemplo n.º 7
0
 public PaymentAliPayController(ISettingService settingService,
                                IPaymentService paymentService,
                                IOrderService orderService,
                                IOrderProcessingService orderProcessingService,
                                ILogger logger,
                                ILocalizationService localizationService,
                                AliPayPaymentSettings aliPayPaymentSettings)
 {
     this._settingService         = settingService;
     this._paymentService         = paymentService;
     this._orderService           = orderService;
     this._orderProcessingService = orderProcessingService;
     this._logger = logger;
     this._localizationService   = localizationService;
     this._aliPayPaymentSettings = aliPayPaymentSettings;
 }
 public PaymentAliPayController(ISettingService settingService, 
     IPaymentService paymentService, IOrderService orderService, 
     IOrderProcessingService orderProcessingService, 
     ILogger logger, IWebHelper webHelper,
     AliPayPaymentSettings aliPayPaymentSettings,
     PaymentSettings paymentSettings)
 {
     this._settingService = settingService;
     this._paymentService = paymentService;
     this._orderService = orderService;
     this._orderProcessingService = orderProcessingService;
     this._logger = logger;
     this._webHelper = webHelper;
     this._aliPayPaymentSettings = aliPayPaymentSettings;
     this._paymentSettings = paymentSettings;
 }
Ejemplo n.º 9
0
 public void Copy(AliPayPaymentSettings settings, bool fromSettings)
 {
     if (fromSettings)
     {
         SellerEmail   = settings.SellerEmail;
         Key           = settings.Key;
         Partner       = settings.Partner;
         AdditionalFee = settings.AdditionalFee;
     }
     else
     {
         settings.SellerEmail   = SellerEmail;
         settings.Key           = Key;
         settings.Partner       = Partner;
         settings.AdditionalFee = AdditionalFee;
     }
 }
Ejemplo n.º 10
0
 public PaymentAliPayController(IWorkContext workContext,
                                IStoreService storeService, ISettingService settingService,
                                IPaymentService paymentService, IOrderService orderService,
                                IOrderProcessingService orderProcessingService,
                                ILocalizationService localizationService,
                                ILogger logger, IWebHelper webHelper,
                                AliPayPaymentSettings aliPayPaymentSettings,
                                PaymentSettings paymentSettings, ShoppingCartSettings shoppingCartSettings)
 {
     this._workContext            = workContext;
     this._storeService           = storeService;
     this._settingService         = settingService;
     this._paymentService         = paymentService;
     this._orderService           = orderService;
     this._orderProcessingService = orderProcessingService;
     this._localizationService    = localizationService;
     this._logger                = logger;
     this._webHelper             = webHelper;
     this._aliPayPaymentSettings = aliPayPaymentSettings;
     this._paymentSettings       = paymentSettings;
     this._shoppingCartSettings  = shoppingCartSettings;
 }