public ResultModel UpdatePaymentState(int id, PaymentState state) { try { _formRequestService.UpdatePaymentState(id, state); return(ResultModel.Success); } catch (Exception e) { _logService.LogError(e); return(ResultModel.Error); } }
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("/")); }