public IActionResult Create([FromBody] CreatePaymentDetailView view) { try { _service.Create(view); return(Ok()); } catch (NextPayException exception) { return(BadRequest(exception.Message)); } catch (Exception) { return(BadRequest()); } }
public IActionResult PostPaymentDetail(PaymentDetail paymentDetail) { _paymentDetailService.Create(paymentDetail); return(CreatedAtAction("GetPaymentDetail", new { id = paymentDetail.Id }, paymentDetail)); }