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

            _settingService.SaveSetting(settings);

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

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

            base.Install();
        }
Esempio n. 2
0
 /// <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;
 }