Beispiel #1
0
 public PaymentYandexKassaController(IWorkContext workContext,
                                     PaymentSettings paymentSettings, IPaymentService paymentService,
                                     IStoreService storeService,
                                     ISettingService settingService,
                                     ILocalizationService localizationService,
                                     IOrderService orderService,
                                     IOrderProcessingService orderProcessingService,
                                     IWebHelper webHelper,
                                     YandexKassaPaymentSettings yandexKassaSettings,
                                     ICurrencyService currencyService,
                                     ILogger logger)
 {
     this._workContext            = workContext;
     this._paymentSettings        = paymentSettings;
     this._paymentService         = paymentService;
     this._storeService           = storeService;
     this._settingService         = settingService;
     this._localizationService    = localizationService;
     this._orderService           = orderService;
     this._orderProcessingService = orderProcessingService;
     this._webHelper           = webHelper;
     this._yandexKassaSettings = yandexKassaSettings;
     this._currencyService     = currencyService;
     this._logger = logger;
 }
 public PaymentYandexKassaController(IWorkContext workContext,
     PaymentSettings paymentSettings, IPaymentService paymentService,
     IStoreService storeService,
     ISettingService settingService,
     ILocalizationService localizationService, 
     IOrderService orderService, 
     IOrderProcessingService orderProcessingService,
     IWebHelper webHelper,
     YandexKassaPaymentSettings yandexKassaSettings)
 {
     this._workContext = workContext;
     this._paymentSettings = paymentSettings;
     this._paymentService = paymentService;
     this._storeService = storeService;
     this._settingService = settingService;
     this._localizationService = localizationService;
     this._orderService = orderService;
     this._orderProcessingService = orderProcessingService;
     this._webHelper = webHelper;
     this._yandexKassaSettings = yandexKassaSettings;
 }
Beispiel #3
0
        private bool _VerifyMd5(string action, YandexRequestModel model, Order order, YandexKassaPaymentSettings settings)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("{0};", action.Trim());
            sb.AppendFormat("{0};", Math.Round(_currencyService.ConvertFromPrimaryStoreCurrency(order.OrderTotal, _workContext.WorkingCurrency), 2).ToString(CultureInfo.InvariantCulture).Trim());
            sb.AppendFormat("{0};", model.orderSumCurrencyPaycash.Trim());
            sb.AppendFormat("{0};", model.orderSumBankPaycash.Trim());
            sb.AppendFormat("{0};", settings.ShopId.ToString().Trim());
            sb.AppendFormat("{0};", model.invoiceId.ToString().Trim());
            sb.AppendFormat("{0};", order.BillingAddress.Email.Trim());
            sb.AppendFormat("{0}", settings.ShopPassword.Trim());



            return(sb.ToString().VerifyMd5Hash(model.md5.Trim()));
        }