public WeiXinPayPaymentProcessor(WeiXinPayPaymentSettings weixinPayPaymentSettings,
                                  ISettingService settingService, IWebHelper webHelper,
                                  IStoreContext storeContext)
 {
     this._weixinPayPaymentSettings = weixinPayPaymentSettings;
     this._settingService           = settingService;
     this._webHelper    = webHelper;
     this._storeContext = storeContext;
 }
 public WeiXinPayPaymentProcessor(WeiXinPayPaymentSettings weixinPayPaymentSettings,
     ISettingService settingService, IWebHelper webHelper,
     IStoreContext storeContext)
 {
     this._weixinPayPaymentSettings = weixinPayPaymentSettings;
     this._settingService = settingService;
     this._webHelper = webHelper;
     this._storeContext = storeContext;
 }
        public override void Install()
        {
            //settings
            var settings = new WeiXinPayPaymentSettings()
            {
                SellerEmail    = "",
                Key            = "",
                Partner        = "",
                AdditionalFee  = 0,
                InvoiceSubject = "Order Subject",
                //InvoiceBody = "对一笔交易的具体描述信息",
                EnableBankPay = true
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.RedirectionTip", "Select pay method, you will be redirected to WeiXinPay site to complete the order.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.SellerEmail", "Seller email");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.SellerEmail.Hint", "Enter seller email.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.Key", "Key");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.Key.Hint", "Enter key.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.Partner", "Partner");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.Partner.Hint", "Enter partner.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.ReturnUrl", "Return Url (Please leave it empty, if you didn't have custom page)");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.ReturnUrl.Hint", "Return Url.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.AdditionalFee", "Additional fee");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.AdditionalFee.Hint", "Enter additional fee to charge your customers.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.InvoiceSubject", "Subject");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.InvoiceSubject.Hint", "Enter name of product.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.InvoiceBody", "Body");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.InvoiceBody.Hint", "Enter description of product.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.EnableBankPay", "Enable Bank Pay");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.EnableBankPay.Hint", "Enable bank pay.");
            this.AddOrUpdatePluginLocaleResource("Payment.PayMethod", "Pay Method");
            this.AddOrUpdatePluginLocaleResource("Payment.PayMethod.Hint", "Select pay method.");
            this.AddOrUpdatePluginLocaleResource("Payment.DirectPayMethod", "Alipay direct pay");
            this.AddOrUpdatePluginLocaleResource("Payment.DirectPayMethod.Hint", "Alipay direct pay.");
            this.AddOrUpdatePluginLocaleResource("Payment.BankPayMethod", "Alipay bank pay");
            this.AddOrUpdatePluginLocaleResource("Payment.BankPayMethod.Hint", "Alipay bank pay.");
            base.Install();
        }
        public override void Install()
        {
            //settings
            var settings = new WeiXinPayPaymentSettings()
            {
                SellerEmail = "",
                Key = "",
                Partner= "",
                AdditionalFee = 0,
                InvoiceSubject = "Order Subject",
                //InvoiceBody = "��һ�ʽ��׵ľ���������Ϣ",
                EnableBankPay = true
            };
            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.RedirectionTip", "Select pay method, you will be redirected to WeiXinPay site to complete the order.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.SellerEmail", "Seller email");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.SellerEmail.Hint", "Enter seller email.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.Key", "Key");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.Key.Hint", "Enter key.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.Partner", "Partner");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.Partner.Hint", "Enter partner.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.ReturnUrl", "Return Url (Please leave it empty, if you didn't have custom page)");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.ReturnUrl.Hint", "Return Url.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.AdditionalFee", "Additional fee");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.AdditionalFee.Hint", "Enter additional fee to charge your customers.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.InvoiceSubject", "Subject");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.InvoiceSubject.Hint", "Enter name of product.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.InvoiceBody", "Body");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.InvoiceBody.Hint", "Enter description of product.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.EnableBankPay", "Enable Bank Pay");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.WeiXinPay.EnableBankPay.Hint", "Enable bank pay.");
            this.AddOrUpdatePluginLocaleResource("Payment.PayMethod", "Pay Method");
            this.AddOrUpdatePluginLocaleResource("Payment.PayMethod.Hint", "Select pay method.");
            this.AddOrUpdatePluginLocaleResource("Payment.DirectPayMethod", "Alipay direct pay");
            this.AddOrUpdatePluginLocaleResource("Payment.DirectPayMethod.Hint", "Alipay direct pay.");
            this.AddOrUpdatePluginLocaleResource("Payment.BankPayMethod", "Alipay bank pay");
            this.AddOrUpdatePluginLocaleResource("Payment.BankPayMethod.Hint", "Alipay bank pay.");
            base.Install();
        }