Exemplo n.º 1
0
        public IActionResult ApproveArcaCardsTransactionOrder(ApproveIdRequest request)
        {
            if (ModelState.IsValid)
            {
                var response = new SingleResponse <long>()
                {
                    ResultCode = ResultCodes.normal
                };

                ArcaCardsTransactionOrder order = _cacheHelper.GetApprovalOrder <ArcaCardsTransactionOrder>(request.Id);

                ActionResult saveResult = _xbService.ApproveArcaCardsTransactionOrder(order);

                response.ResultCode  = ResultCodeFormatter.FromPersonalAccountSecurityService(saveResult.ResultCode);
                response.Result      = saveResult.Id;
                response.Description = utils.GetActionResultErrors(saveResult.Errors);

                return(ResponseExtensions.ToHttpResponse(response));
            }
            else
            {
                return(ValidationError.GetValidationErrorResponse(ModelState));
            }
        }