Exemple #1
0
        public override void Install()
        {
            var settings = new OkPayPaymentSettings
            {
                OrderDescription = Constants.ORDER_DESCRIPTION,
                WalletId         = "OK"
            };

            _settingService.SaveSetting(settings);
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.OkPay.Fields.OrderDescription", "Order description");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.OkPay.Fields.OrderDescription.Hint", "Order description template.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.RedirectionTip", "You will be redirected to OKPAY site to complete the order.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.WalletId", "Wallet ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.WalletId.Hint", "Specify your OkPay wallet Id.");
            //currently OkPay does not support a separate parameter discounts and gift cards.
            //therefore, the code commented out. OkPay developers promise to include support for gift cards in the near future.
            //TODO: Uncomment next time
            //this.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.PassProductNamesAndTotals", "Pass product names and order totals to OkPay");
            //this.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.PassProductNamesAndTotals.Hint", "Check if product names and order totals should be passed to OkPay.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.Fees", "Commission payable");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.Fees.Hint", "Merchant – commission payable by the merchant (default); Buyer – commission payable by the buyer.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.Fees.Item.Merchant", "Merchant");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.Fees.Item.Buyer", "Buyer");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.ReturnFromOkPayWithoutPaymentRedirectsToOrderDetailsPage", "Return to order details page");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.ReturnFromOkPayWithoutPaymentRedirectsToOrderDetailsPage.Hint", "Enable if a customer should be redirected to the order details page when he clicks \"return to store\" link on OkPay site WITHOUT completing a payment.");

            base.Install();
        }
        public override void Install()
        {
            var settings = new OkPayPaymentSettings
            {
                OrderDescription = Constants.ORDER_DESCRIPTION,
                WalletId         = "OK"
            };

            _settingService.SaveSetting(settings);
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.OkPay.Fields.OrderDescription", "Order description");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.OkPay.Fields.OrderDescription.Hint", "Order description template.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.RedirectionTip", "You will be redirected to OKPAY site to complete the order.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.WalletId", "Wallet ID");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.WalletId.Hint", "Specify your OkPay wallet Id.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.PassBillingInfo", "Pass billing info to OkPay");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.PassBillingInfo.Hint", "Check if billing info should be passed to OkPay.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.Fees", "Commission payable");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.Fees.Hint", "Merchant – commission payable by the merchant (default); Buyer – commission payable by the buyer.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.Fees.Item.Merchant", "Merchant");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.Fees.Item.Buyer", "Buyer");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.ReturnFromOkPayWithoutPaymentRedirectsToOrderDetailsPage", "Return to order details page");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.Fields.ReturnFromOkPayWithoutPaymentRedirectsToOrderDetailsPage.Hint", "Enable if a customer should be redirected to the order details page when he clicks \"return to store\" link on OkPay site WITHOUT completing a payment.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.OKPAY.PaymentMethodDescription", "You will be redirected to OKPAY site to complete the order.");

            base.Install();
        }
Exemple #3
0
 public OkPayPaymentProcessor(
     ICurrencyService currencyService,
     ILocalizationService localizationService,
     ISettingService settingService,
     IWebHelper webHelper,
     CurrencySettings currencySettings,
     OkPayPaymentSettings okPayPaymentSettings)
 {
     _currencyService      = currencyService;
     _localizationService  = localizationService;
     _settingService       = settingService;
     _webHelper            = webHelper;
     _currencySettings     = currencySettings;
     _okPayPaymentSettings = okPayPaymentSettings;
 }