Пример #1
0
        public IActionResult InsertTransaction([FromBody] JObject jsonTransaction)
        {
            string      clientId      = Request.HttpContext.Items["ClientId"]?.ToString();
            Transaction transaction   = Transaction.CreateFromJson(jsonTransaction, clientId);
            string      transactionId = _transactionProcessor.InsertTransaction(transaction);

            if (transactionId != null && !transactionId.StartsWith("ERROR:"))
            {
                return(Json(transactionId));
            }
            return(BadRequest(transactionId));
        }