public IActionResult Post(CreatePaymentViewModel viewModel) { var paymentRequest = _paymentRequestRepository.Get(viewModel.PaymentRequestId).Result; var makePaymentCommand = MapFrom(paymentRequest, viewModel); var paymentId = _paymentsCommandHandler.Handle(makePaymentCommand).Result; return(Redirect("https://localhost:44388/CheckoutResponse?invoiceId=" + viewModel.InvoiceId + "&paymentId=" + paymentId)); }
public async Task <IActionResult> Post(MakeGuestToMerchantPaymentRequest paymentRequest) { var command = MakeCommand(paymentRequest); await _paymentCommandHandler.Handle(command); var uri = Url.Link("GetPayment", new { paymentId = command.PaymentId }); return(Created(uri, null)); }