//[ValidateAntiForgeryToken] public async Task <SubmitResponseDto> Submit( Guid gatewayId, [FromBody] SubmitDto dto ) { _logger.LogDebug("Create payment submit {0}, {1}, {2}, {3}", gatewayId, dto.Amount, dto.Currency, dto.Reference); var paymentDetails = await _paymentProcessor.CreatePayment(gatewayId, dto.Amount, dto.Currency, dto.Reference, dto.Memo); Response.StatusCode = 201; return(new SubmitResponseDto { GatewayId = gatewayId, PaymentId = paymentDetails.PaymentId }); // TODO: Should this return: new CreatedResult(.. or something??? }
public ActionResult AddPayment(HouseHoldViewModel model) { if (ModelState.IsValid) { PaymentProcessor.CreatePayment( //!Bill is checked in this function model.Payment.BillId, model.Payment.RoommateId, model.Payment.AmountPaid); //TODO SQL bug where amount due is being devided up per assigned each time return(RedirectToAction("Index")); } return(View()); }