예제 #1
0
 public ResultModel UpdatePaymentState(int id, PaymentState state)
 {
     try
     {
         _formRequestService.UpdatePaymentState(id, state);
         return(ResultModel.Success);
     }
     catch (Exception e)
     {
         _logService.LogError(e);
         return(ResultModel.Error);
     }
 }
예제 #2
0
        public ActionResult PaymentAccepted(string id)
        {
            Guid guid;
            bool parsed = Guid.TryParse(id, out guid);

            if (!parsed)
            {
                return(new HttpStatusCodeResult(403)
                {
                });
            }
            var formRequestId = _formRequestService.GetOneFormRequest(guid).FormRequestId;

            _formRequestService.UpdatePaymentState(formRequestId, PaymentState.Paid, true);
            return(new RedirectResult("/"));
        }