コード例 #1
0
 public PayPalStandardPaymentProcessor(CurrencySettings currencySettings,
                                       ICheckoutAttributeParser checkoutAttributeParser,
                                       ICurrencyService currencyService,
                                       IGenericAttributeService genericAttributeService,
                                       IHttpContextAccessor httpContextAccessor,
                                       ILocalizationService localizationService,
                                       IOrderTotalCalculationService orderTotalCalculationService,
                                       ISettingService settingService,
                                       ITaxService taxService,
                                       IProductService productService,
                                       IWebHelper webHelper,
                                       IServiceProvider serviceProvider,
                                       PayPalStandardPaymentSettings paypalStandardPaymentSettings)
 {
     this._currencySettings             = currencySettings;
     this._checkoutAttributeParser      = checkoutAttributeParser;
     this._currencyService              = currencyService;
     this._genericAttributeService      = genericAttributeService;
     this._httpContextAccessor          = httpContextAccessor;
     this._localizationService          = localizationService;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._settingService  = settingService;
     this._taxService      = taxService;
     this._productService  = productService;
     this._webHelper       = webHelper;
     this._serviceProvider = serviceProvider;
     this._paypalStandardPaymentSettings = paypalStandardPaymentSettings;
 }
コード例 #2
0
 public PayPalStandardPaymentProcessor(
     ICheckoutAttributeParser checkoutAttributeParser,
     IGenericAttributeService genericAttributeService,
     IHttpContextAccessor httpContextAccessor,
     ILocalizationService localizationService,
     IOrderTotalCalculationService orderTotalCalculationService,
     ISettingService settingService,
     ITaxService taxService,
     IProductService productService,
     IWebHelper webHelper,
     ILanguageService languageService,
     IServiceProvider serviceProvider,
     PayPalStandardPaymentSettings paypalStandardPaymentSettings)
 {
     _checkoutAttributeParser      = checkoutAttributeParser;
     _genericAttributeService      = genericAttributeService;
     _httpContextAccessor          = httpContextAccessor;
     _localizationService          = localizationService;
     _orderTotalCalculationService = orderTotalCalculationService;
     _settingService  = settingService;
     _taxService      = taxService;
     _productService  = productService;
     _webHelper       = webHelper;
     _languageService = languageService;
     _serviceProvider = serviceProvider;
     _paypalStandardPaymentSettings = paypalStandardPaymentSettings;
 }
コード例 #3
0
 public PayPalStandardPaymentProcessor(PayPalStandardPaymentSettings paypalStandardPaymentSettings,
                                       ISettingService settingService, ICurrencyService currencyService,
                                       CurrencySettings currencySettings, IWebHelper webHelper,
                                       ICheckoutAttributeParser checkoutAttributeParser, ITaxService taxService, IProductService productService,
                                       IOrderTotalCalculationService orderTotalCalculationService, HttpContextBase httpContext)
 {
     this._paypalStandardPaymentSettings = paypalStandardPaymentSettings;
     this._settingService               = settingService;
     this._currencyService              = currencyService;
     this._currencySettings             = currencySettings;
     this._webHelper                    = webHelper;
     this._checkoutAttributeParser      = checkoutAttributeParser;
     this._taxService                   = taxService;
     this._productService               = productService;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._httpContext                  = httpContext;
 }
コード例 #4
0
        public override void Install()
        {
            //settings
            var settings = new PayPalStandardPaymentSettings
            {
                UseSandbox            = true,
                BusinessEmail         = "*****@*****.**",
                PdtToken              = "Your PDT token here...",
                PdtValidateOrderTotal = true,
                EnableIpn             = true,
                AddressOverride       = true,
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.RedirectionTip", "You will be redirected to PayPal site to complete the order.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.UseSandbox", "Use Sandbox");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.UseSandbox.Hint", "Check to enable Sandbox (testing environment).");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.BusinessEmail", "Business Email");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.BusinessEmail.Hint", "Specify your PayPal business email.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.PDTToken", "PDT Identity Token");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.PDTToken.Hint", "Specify PDT identity token");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.PDTValidateOrderTotal", "PDT. Validate order total");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.PDTValidateOrderTotal.Hint", "Check if PDT handler should validate order totals.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.AdditionalFee", "Additional fee");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.AdditionalFee.Hint", "Enter additional fee to charge your customers.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.AdditionalFeePercentage", "Additional fee. Use percentage");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.AdditionalFeePercentage.Hint", "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.PassProductNamesAndTotals", "Pass product names and order totals to PayPal");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.PassProductNamesAndTotals.Hint", "Check if product names and order totals should be passed to PayPal.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.EnableIpn", "Enable IPN (Instant Payment Notification)");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.EnableIpn.Hint", "Check if IPN is enabled.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.EnableIpn.Hint2", "Leave blank to use the default IPN handler URL.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.IpnUrl", "IPN Handler");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.IpnUrl.Hint", "Specify IPN Handler.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.AddressOverride", "Address override");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.AddressOverride.Hint", "For people who already have PayPal accounts and whom you already prompted for a shipping address before they choose to pay with PayPal, you can use the entered address instead of the address the person has stored with PayPal.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.ReturnFromPayPalWithoutPaymentRedirectsToOrderDetailsPage", "Return to order details page");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.PayPalStandard.Fields.ReturnFromPayPalWithoutPaymentRedirectsToOrderDetailsPage.Hint", "Enable if a customer should be redirected to the order details page when he clicks \"return to store\" link on PayPal site WITHOUT completing a payment");

            base.Install();
        }