示例#1
0
        public async Task <ActionResult> Post([FromBody] PaymentModel model)
        {
            if (!model.IsValid())
            {
                return(UnprocessableEntity());
            }

            var bankResponse = bankService.SubmitPayment(model);
            var payment      = paymentMapper.Map(model, bankResponse);
            await addEntityCommand.ExecuteAsync(payment);

            return(Ok(payment.Id));
        }