Ejemplo n.º 1
0
        public async Task <IActionResult> UpdateTransaction(int transactionId, [FromBody] Models.TransactionUpdateRequest trans)
        {
            try
            {
                Entities.Transaction transaction = new Entities.Transaction()
                {
                    TransactionId   = transactionId,
                    StatusId        = trans.StatusId,
                    RejectReason    = trans.RejectedReason,
                    ReceiverComment = trans.ProviderComment,
                };
                await _transactionBL.UpdateTransaction(transaction, transactionId);

                return(Ok(new { message = MessageConstant.UPDATE_SUCCESS }));
            }
            catch (Exception ex)
            {
                return(BadRequest(new { message = MessageConstant.UNHANDLE_ERROR, error = ex.StackTrace }));
            }
        }