コード例 #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()
        {
            //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();
        }