public ActionResult SberMerchant(string commonOrderId) { var order = OrderService.GetByCommonId(commonOrderId); if (!order.IsSig) { CartService.SetPaymentType(PaymentTypes.SberMerchant, order.OrderID); } if (order.IsSigPaid) { return(Content("Статус заказа ОПЛ")); } string url = null; try{ url = SberbankService.GetUrl(order); } catch (Exception ex) { Logger.Exception(ex, User); } if (url == null) { return(BaseViewWithTitle("Данный способ оплаты недоступен", new PagePart(H.Anchor(Request.UrlReferrer.AbsoluteUri.Remove(CommonConst.CurrentRoot), "Выберите другой способ оплаты").ToString()))); } return(this.Redirect(url)); }
private void UpdateOrderPrice(string mdOrder, Order order) { try { var amount = SberbankService.GetAmount(mdOrder, order); if (amount > 0) { order.TotalPriceWithDescount = amount; } } catch (Exception e) { Logger.Exception(e, "SberbankCallback"); } }