Esempio 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.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.PaymentMethodDescription", "You will be redirected to AliPay site to complete the order.");

            base.Install();
        }
        public override void Install()
        {
            //settings
            var settings = new AliPayPaymentSettings()
            {
                UseSandbox    = true,
                SellerEmail   = "",
                Key           = "",
                Partner       = "",
                AdditionalFee = 0,
            };

            _settingService.SaveSetting(settings);

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

            base.Install();
        }
        public override void Install()
        {
            //配置
            var settings = new AliPayPaymentSettings
            {
                SellerEmail   = "",
                Key           = "",
                Partner       = "",
                AdditionalFee = 0,
            };

            _settingService.SaveSetting(settings);

            //安装数据表
            _objectContext.Install();

            //本地化资源
            _localizationService.AddOrUpdatePluginLocaleResource("Nop.Plugins.Payments.AliPay.RedirectionTip", "您将被重定向到支付宝网站完成订单.");
            _localizationService.AddOrUpdatePluginLocaleResource("Nop.Plugins.Payments.AliPay.SellerEmail", "卖方邮箱");
            _localizationService.AddOrUpdatePluginLocaleResource("Nop.Plugins.Payments.AliPay.SellerEmail.Hint", "支付宝卖方电子邮箱.");
            _localizationService.AddOrUpdatePluginLocaleResource("Nop.Plugins.Payments.AliPay.Key", "Key");
            _localizationService.AddOrUpdatePluginLocaleResource("Nop.Plugins.Payments.AliPay.Key.Hint", "输入 key.");
            _localizationService.AddOrUpdatePluginLocaleResource("Nop.Plugins.Payments.AliPay.Partner", "Partner");
            _localizationService.AddOrUpdatePluginLocaleResource("Nop.Plugins.Payments.AliPay.Partner.Hint", "输入 partner.");
            _localizationService.AddOrUpdatePluginLocaleResource("Nop.Plugins.Payments.AliPay.AdditionalFee", "额外费用");
            _localizationService.AddOrUpdatePluginLocaleResource("Nop.Plugins.Payments.AliPay.AdditionalFee.Hint", "客户选择此支付方式将付额外的费用.");
            _localizationService.AddOrUpdatePluginLocaleResource("Nop.Plugins.Payments.AliPay.PaymentMethodDescription", "使用支付宝进行支付");

            base.Install();
        }
Esempio n. 4
0
 public Submit(AliPayPaymentSettings setting)
 {
     _key           = setting.Key.Trim();
     _partner       = setting.Partner.Trim();
     _input_charset = "utf-8";
     _sign_type     = "MD5";
 }
        public override void Install()
        {
            //settings
            var settings = new AliPayPaymentSettings
            {
                AppID           = "",
                GatewayUrl      = "",
                PrivateKey      = "",
                AlipayPublicKey = "",
                SignType        = "",
                AdditionalFee   = 0,
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.RedirectionTip", "将为您转到支付宝进行支付.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.AppID", "AppID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.AppID.Hint", "Enter AppID.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.GatewayUrl", "GatewayUrl");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.GatewayUrl.Hint", "Enter GatewayUrl.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.PrivateKey", "PrivateKey");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.PrivateKey.Hint", "Enter PrivateKey.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.AlipayPublicKey", "AlipayPublicKey");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.AlipayPublicKey.Hint", "Enter AlipayPublicKey.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.SignType", "SignType");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.SignType.Hint", "Enter SignType.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.AdditionalFee", "Additional fee");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.AdditionalFee.Hint", "输入额外费用,没有则输入0");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.PaymentMethodDescription", "您将被重定向到支付宝进行支付.");

            base.Install();
        }
 public AliPayPaymentProcessor(AliPayPaymentSettings aliPayPaymentSettings,
                               ISettingService settingService, IWebHelper webHelper,
                               IStoreContext storeContext)
 {
     this._aliPayPaymentSettings = aliPayPaymentSettings;
     this._settingService        = settingService;
     this._webHelper             = webHelper;
     this._storeContext          = storeContext;
 }
Esempio n. 7
0
 public AliPayPaymentProcessor(AliPayPaymentSettings aliPayPaymentSettings,
     ISettingService settingService, IWebHelper webHelper,
     IStoreContext storeContext)
 {
     this._aliPayPaymentSettings = aliPayPaymentSettings;
     this._settingService = settingService;
     this._webHelper = webHelper;
     this._storeContext = storeContext;
 }
Esempio n. 8
0
 public AliPayPaymentProcessor(AliPayPaymentSettings aliPayPaymentSettings,
                               StoreInformationSettings storeInformationSettings,
                               ISettingService settingService, IWebHelper webHelper)
 {
     this._aliPayPaymentSettings    = aliPayPaymentSettings;
     this._storeInformationSettings = storeInformationSettings;
     this._settingService           = settingService;
     this._webHelper = webHelper;
 }
Esempio n. 9
0
 public AliPayPaymentProcessor(
     ISettingService settingService,
     IWebHelper webHelper,
     IStoreContext storeContext,
     AliPayPaymentSettings aliPayPaymentSettings,
     ILocalizationService localizationService)
 {
     this._settingService        = settingService;
     this._webHelper             = webHelper;
     this._storeContext          = storeContext;
     this._aliPayPaymentSettings = aliPayPaymentSettings;
     this._localizationService   = localizationService;
 }
Esempio n. 10
0
        public AliPayPaymentProcessor(AliPayPaymentSettings aliPayPaymentSettings,
                                      ISettingService settingService, IWebHelper webHelper,
                                      IStoreContext storeContext, ILocalizationService localizationService)
        {
            this._aliPayPaymentSettings = aliPayPaymentSettings;
            this._settingService        = settingService;
            this._webHelper             = webHelper;
            this._storeContext          = storeContext;
            this._localizationService   = localizationService;

            _key           = Config.Key.Trim();
            _input_charset = Config.Input_charset.Trim().ToLower();
            _sign_type     = Config.Sign_type.Trim().ToUpper();
        }
        public override void Install()
        {
            //settings
            var settings = new AliPayPaymentSettings()
            {
                SellerEmail    = "",
                Key            = "",
                Partner        = "",
                AdditionalFee  = 0,
                InvoiceSubject = "Order Subject",
                //InvoiceBody = "对一笔交易的具体描述信息",
                EnableBankPay = true
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.RedirectionTip", "Select pay method, 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.ReturnUrl", "Return Url (Please leave it empty, if you didn't have custom page)");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.ReturnUrl.Hint", "Return Url.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.AdditionalFee", "Additional fee");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.AdditionalFee.Hint", "Enter additional fee to charge your customers.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.InvoiceSubject", "Subject");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.InvoiceSubject.Hint", "Enter name of product.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.InvoiceBody", "Body");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.InvoiceBody.Hint", "Enter description of product.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.EnableBankPay", "Enable Bank Pay");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.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 AliPayPaymentProcessor(ILogger logger,
                               ISettingService settingService,
                               IWebHelper webHelper,
                               IStoreContext storeContext,
                               ICurrencyService currencyService,
                               CurrencySettings currencySettings,
                               AliPayPaymentSettings aliPayPaymentSettings,
                               ILocalizationService localizationService,
                               HttpContextBase httpContext)
 {
     this._logger                = logger;
     this._settingService        = settingService;
     this._webHelper             = webHelper;
     this._storeContext          = storeContext;
     this._currencyService       = currencyService;
     this._currencySettings      = currencySettings;
     this._aliPayPaymentSettings = aliPayPaymentSettings;
     this._localizationService   = localizationService;
     this._httpContext           = httpContext;
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="settingService"></param>
 /// <param name="webHelper"></param>
 /// <param name="storeContext"></param>
 /// <param name="aliPayPaymentSettings"></param>
 /// <param name="localizationService"></param>
 /// <param name="workContext"></param>
 /// <param name="objectContext"></param>
 /// <param name="paymentInfoService"></param>
 /// <param name="refundInfoService"></param>
 public AliPayPaymentProcessor(
     ISettingService settingService,
     IWebHelper webHelper,
     IStoreContext storeContext,
     AliPayPaymentSettings aliPayPaymentSettings,
     ILocalizationService localizationService,
     IWorkContext workContext,
     AliPayObjectContext objectContext,
     IPaymentInfoService paymentInfoService,
     IRefundInfoService refundInfoService)
 {
     this._settingService        = settingService;
     this._webHelper             = webHelper;
     this._storeContext          = storeContext;
     this._aliPayPaymentSettings = aliPayPaymentSettings;
     this._localizationService   = localizationService;
     this._workContext           = workContext;
     this._objectContext         = objectContext;
     this._paymentInfoService    = paymentInfoService;
     this._refundInfoService     = refundInfoService;
 }
Esempio n. 14
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();
        }
        public override void Install()
        {
            //settings
            var settings = new AliPayPaymentSettings()
            {
                SellerEmail = "",
                Key = "",
                Partner= "",
                AdditionalFee = 0,
                InvoiceSubject = "Order Subject",
                //InvoiceBody = "��һ�ʽ��׵ľ���������Ϣ",
                EnableBankPay = true
            };
            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.RedirectionTip", "Select pay method, 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.ReturnUrl", "Return Url (Please leave it empty, if you didn't have custom page)");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.ReturnUrl.Hint", "Return Url.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.AdditionalFee", "Additional fee");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.AdditionalFee.Hint", "Enter additional fee to charge your customers.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.InvoiceSubject", "Subject");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.InvoiceSubject.Hint", "Enter name of product.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.InvoiceBody", "Body");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.InvoiceBody.Hint", "Enter description of product.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.EnableBankPay", "Enable Bank Pay");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.AliPay.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();
        }