示例#1
0
 public PaytmPaymentProcessor(CurrencySettings currencySettings,
                              ICheckoutAttributeParser checkoutAttributeParser,
                              ICurrencyService currencyService,
                              IGenericAttributeService genericAttributeService,
                              IHttpContextAccessor httpContextAccessor,
                              ILocalizationService localizationService,
                              IPaymentService paymentService,
                              IOrderTotalCalculationService orderTotalCalculationService,
                              ISettingService settingService,
                              ITaxService taxService,
                              IWebHelper webHelper,
                              PaytmPaymentSettings PaytmPaymentSettings)
 {
     this._currencySettings             = currencySettings;
     this._checkoutAttributeParser      = checkoutAttributeParser;
     this._currencyService              = currencyService;
     this._genericAttributeService      = genericAttributeService;
     this._httpContextAccessor          = httpContextAccessor;
     this._localizationService          = localizationService;
     this._paymentService               = paymentService;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._settingService               = settingService;
     this._taxService           = taxService;
     this._webHelper            = webHelper;
     this._PaytmPaymentSettings = PaytmPaymentSettings;
 }
示例#2
0
        public override void Install()
        {
            var settings = new PaytmPaymentSettings()
            {
                MerchantId     = "",
                MerchantKey    = "",
                Website        = "",
                IndustryTypeId = "",
                PaymentUrl     = "",
                CallBackUrl    = "",
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.RedirectionTip", "You will be redirected to Paytm site to complete the order.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.MerchantId", "Merchant ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.MerchantId.Hint", "Enter merchant ID.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.MerchantKey", "Merchant Key");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.MerchantKey.Hint", "Enter Merchant key.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Website", "Website");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Website.Hint", "Enter website param.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.IndustryTypeId", "Industry Type Id");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.IndustryTypeId.Hint", "Enter Industry Type Id.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.PaymentUrl", "Payment URL");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.PaymentUrl.Hint", "Select payment url.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.CallBackUrl", "Callback url URL");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.CallBackUrl.Hint", "enter call back url.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.PaymentMethodDescription", "Pay by Paytm Wallet / credit / debit card / Net Banking");
            base.Install();
        }
 public PaytmPaymentProcessor(CurrencySettings currencySettings,
                              ICheckoutAttributeParser checkoutAttributeParser,
                              ICurrencyService currencyService,
                              IGenericAttributeService genericAttributeService,
                              IHttpContextAccessor httpContextAccessor,
                              ILocalizationService localizationService,
                              IPaymentService paymentService,
                              ISettingService settingService,
                              ITaxService taxService,
                              IWebHelper webHelper,
                              PaytmHttpClient paytmHttpClient,
                              IOrderTotalCalculationService orderTotalCalculationService,
                              PaytmPaymentSettings paytmPaymentSettings)
 {
     _currencySettings        = currencySettings;
     _checkoutAttributeParser = checkoutAttributeParser;
     _currencyService         = currencyService;
     _genericAttributeService = genericAttributeService;
     _httpContextAccessor     = httpContextAccessor;
     _localizationService     = localizationService;
     _paymentService          = paymentService;
     _settingService          = settingService;
     _taxService                   = taxService;
     _webHelper                    = webHelper;
     _paytmHttpClient              = paytmHttpClient;
     _paytmPaymentSettings         = paytmPaymentSettings;
     _orderTotalCalculationService = orderTotalCalculationService;
 }
        //CCACrypto ccaCrypto = new CCACrypto();
        #endregion

        #region Ctor

        public PaytmPaymentProcessor(PaytmPaymentSettings PaytmPaymentSettings,
            ISettingService settingService, ICurrencyService currencyService,
            CurrencySettings currencySettings, IWebHelper webHelper)
        {
            this._PaytmPaymentSettings = PaytmPaymentSettings;
            this._settingService = settingService;
            this._currencyService = currencyService;
            this._currencySettings = currencySettings;
            this._webHelper = webHelper;
        }
示例#5
0
        //CCACrypto ccaCrypto = new CCACrypto();
        #endregion

        #region Ctor

        public PaytmPaymentProcessor(PaytmPaymentSettings PaytmPaymentSettings,
                                     ISettingService settingService, ICurrencyService currencyService,
                                     CurrencySettings currencySettings, IWebHelper webHelper)
        {
            this._PaytmPaymentSettings = PaytmPaymentSettings;
            this._settingService       = settingService;
            this._currencyService      = currencyService;
            this._currencySettings     = currencySettings;
            this._webHelper            = webHelper;
        }
示例#6
0
        //CCACrypto ccaCrypto = new CCACrypto();
        #endregion

        #region Ctor

        public PaytmPaymentProcessor(PaytmPaymentSettings PaytmPaymentSettings,
                                     ISettingService settingService, ICurrencyService currencyService,
                                     CurrencySettings currencySettings, IWebHelper webHelper, ILocalizationService localizationService)
        {
            this._PaytmPaymentSettings = PaytmPaymentSettings;
            this._settingService       = settingService;
            this._currencyService      = currencyService;
            this._currencySettings     = currencySettings;
            this._webHelper            = webHelper;
            this._localizationService  = localizationService;
        }
示例#7
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            var settings = new PaytmPaymentSettings()
            {
                MerchantId         = "",
                MerchantKey        = "",
                Website            = "",
                IndustryTypeId     = "",
                PaymentUrl         = "",
                CallBackUrl        = _webHelper.GetStoreLocation(false) + "Plugins/PaymentPaytm/Return",
                TxnStatusUrl       = "",
                UseDefaultCallBack = true
            };

            _settingService.SaveSetting(settings);
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.RedirectionTip", "You will be redirected to Paytm site to complete the order.");

            //locales
            _localizationService.AddPluginLocaleResource(new Dictionary <string, string>
            {
                ["Plugins.Payments.Paytm.Fields.MerchantId"]              = "Merchant ID",
                ["Plugins.Payments.Paytm.Fields.MerchantId.Hint"]         = "Enter merchant ID.",
                ["Plugins.Payments.Paytm.Fields.MerchantKey"]             = "Merchant Key",
                ["Plugins.Payments.Paytm.Fields.MerchantKey.Hint"]        = "Enter Merchant key.",
                ["Plugins.Payments.Paytm.Fields.Website"]                 = "Website",
                ["Plugins.Payments.Paytm.Fields.Website.Hint"]            = "Enter website param.",
                ["Plugins.Payments.Paytm.Fields.IndustryTypeId"]          = "Industry Type Id",
                ["Plugins.Payments.Paytm.Fields.IndustryTypeId.Hint"]     = "Enter Industry Type Id.",
                ["Plugins.Payments.Paytm.Fields.PaymentUrl"]              = "Payment URL",
                ["Plugins.Payments.Paytm.Fields.PaymentUrl.Hint"]         = "Select Payment url.",
                ["Plugins.Payments.Paytm.Fields.CallBackUrl"]             = "Callback URL",
                ["Plugins.Payments.Paytm.Fields.CallBackUrl.Hint"]        = "Enter Callback URL",
                ["Plugins.Payments.Paytm.Fields.TxnStatusUrl"]            = "TxnStatus URL",
                ["Plugins.Payments.Paytm.Fields.TxnStatusUrl.Hint"]       = "Enter TxnStatus URL",
                ["Plugins.Payments.Paytm.Fields.UseDefaultCallBack"]      = "Default CallBack",
                ["Plugins.Payments.Paytm.Fields.UseDefaultCallBack.Hint"] = "Uncheck and use customized CallBack Url in below field.",

                ["Plugins.Payments.Paytm.PaymentMethodDescription"] = "Pay by Paytm Wallet / credit / debit card / Net Banking",
            });

            base.Install();
        }
示例#8
0
 public PaytmPaymentProcessor(CurrencySettings currencySettings,
                              IAddressService addressService,
                              ICheckoutAttributeParser checkoutAttributeParser,
                              ICountryService countryService,
                              ICurrencyService currencyService,
                              ICustomerService customerService,
                              IGenericAttributeService genericAttributeService,
                              IHttpContextAccessor httpContextAccessor,
                              ILocalizationService localizationService,
                              IOrderService orderService,
                              IPaymentService paymentService,
                              IProductService productService,
                              ISettingService settingService,
                              IStateProvinceService stateProvinceService,
                              ITaxService taxService,
                              IWebHelper webHelper,
                              PaytmHttpClient paytmHttpClient,
                              PaytmPaymentSettings paytmPaymentSettings)
 {
     _currencySettings        = currencySettings;
     _addressService          = addressService;
     _checkoutAttributeParser = checkoutAttributeParser;
     _countryService          = countryService;
     _currencyService         = currencyService;
     _customerService         = customerService;
     _genericAttributeService = genericAttributeService;
     _httpContextAccessor     = httpContextAccessor;
     _localizationService     = localizationService;
     _orderService            = orderService;
     _paymentService          = paymentService;
     _productService          = productService;
     _settingService          = settingService;
     _stateProvinceService    = stateProvinceService;
     _taxService           = taxService;
     _webHelper            = webHelper;
     _paytmHttpClient      = paytmHttpClient;
     _paytmPaymentSettings = paytmPaymentSettings;
 }
        public override void Install()
        {
            var settings = new PaytmPaymentSettings()
            {
                MerchantId = "",
                MerchantKey = "",
				Website = "",
				IndustryTypeId = "",
				PaymentUrl = "",
				CallBackUrl = "",

                
            };
            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.RedirectionTip", "You will be redirected to Paytm site to complete the order.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.MerchantId", "Merchant ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.MerchantId.Hint", "Enter merchant ID.");
			this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.MerchantKey", "Merchant Key");
			this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.MerchantKey.Hint", "Enter Merchant key.");
			this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Website", "Website");
			this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Website.Hint", "Enter website param.");
			this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.IndustryTypeId", "Industry Type Id");
			this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.IndustryTypeId.Hint", "Enter Industry Type Id.");
			this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.PaymentUrl", "Payment URL");
			this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.PaymentUrl.Hint", "Select payment url.");
			this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.CallBackUrl", "Callback url URL");
			this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.CallBackUrl.Hint", "enter call back url.");
            base.Install();
        }
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new PaytmPaymentSettings() //mayank
            {
                MerchantId         = "",
                MerchantKey        = "",
                Website            = "",
                IndustryTypeId     = "",
                PaymentUrl         = "",
                CallBackUrl        = _webHelper.GetStoreLocation(false) + "Plugins/PaymentPaytm/Return",
                TxnStatusUrl       = "",
                UseDefaultCallBack = true
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.RedirectionTip", "You will be redirected to Paytm site to complete the order.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.MerchantId", "Merchant ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.MerchantId.Hint", "Enter merchant ID.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.UseDefaultCallBack", "Default CallBack");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.UseDefaultCallBack.Hint", "Uncheck and use customized CallBack Url in below field.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.MerchantKey", "Merchant Key");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.MerchantKey.Hint", "Enter Merchant key.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Website", "Website");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Website.Hint", "Enter website param.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.IndustryTypeId", "Industry Type Id");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.IndustryTypeId.Hint", "Enter Industry Type Id.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.PaymentUrl", "Payment URL");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.PaymentUrl.Hint", "Select payment url.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.CallBackUrl", "Callback URL");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.CallBackUrl.Hint", "Enter call back url.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.TxnStatusUrl", "TxnStatus URL");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.TxnStatusUrl.Hint", "Enter TxnStatus back url.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.PaymentMethodDescription", "Pay by Paytm Wallet / credit / debit card / Net Banking");
            base.Install();

            /*_settingService.SaveSetting(new PaytmPaymentSettings
             * {
             *  UseSandbox = true
             * });
             *
             * //locales
             * this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Fields.AdditionalFee", "Additional fee");
             * this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Fields.AdditionalFee.Hint", "Enter additional fee to charge your customers.");
             * this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Fields.AdditionalFeePercentage", "Additional fee. Use percentage");
             * this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.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.Paytm.Fields.BusinessEmail", "Business Email");
             * this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Fields.BusinessEmail.Hint", "Specify your Paytm business email.");
             * this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Fields.PassProductNamesAndTotals", "Pass product names and order totals to Paytm");
             * this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Fields.PassProductNamesAndTotals.Hint", "Check if product names and order totals should be passed to Paytm.");
             * this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Fields.PDTToken", "PDT Identity Token");
             * this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Fields.PDTToken.Hint", "Specify PDT identity token");
             * this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Fields.RedirectionTip", "You will be redirected to Paytm site to complete the order.");
             * this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Fields.UseSandbox", "Use Sandbox");
             * this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Fields.UseSandbox.Hint", "Check to enable Sandbox (testing environment).");
             * this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.Instructions", "<p><b>If you're using this gateway ensure that your primary store currency is supported by Paytm.</b><br /><br />To use PDT, you must activate PDT and Auto Return in your Paytm account profile. You must also acquire a PDT identity token, which is used in all PDT communication you send to Paytm. Follow these steps to configure your account for PDT:<br /><br />1. Log in to your Paytm account (click <a href=\"https://www.Paytm.com/us/webapps/mpp/referral/Paytm-business-account2?partner_id=9JJPJNNPQ7PZ8\" target=\"_blank\">here</a> to create your account).<br />2. Click the Profile subtab.<br />3. Click Website Payment Preferences in the Seller Preferences column.<br />4. Under Auto Return for Website Payments, click the On radio button.<br />5. For the Return URL, enter the URL on your site that will receive the transaction ID posted by Paytm after a customer payment ({0}).<br />6. Under Payment Data Transfer, click the On radio button.<br />7. Click Save.<br />8. Click Website Payment Preferences in the Seller Preferences column.<br />9. Scroll down to the Payment Data Transfer section of the page to view your PDT identity token.<br /><br /></p>");
             * this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.PaymentMethodDescription", "You will be redirected to Paytm site to complete the payment");
             * this.AddOrUpdatePluginLocaleResource("Plugins.Payments.Paytm.RoundingWarning", "It looks like you have \"ShoppingCartSettings.RoundPricesDuringCalculation\" setting disabled. Keep in mind that this can lead to a discrepancy of the order total amount, as Paytm only rounds to two decimals.");
             *
             * base.Install();*/
        }