Update InvoiceController.cs

This commit is contained in:
MarcEricMartel 2022-12-08 17:59:45 -08:00
parent 64f0d7a60c
commit 7f252bc030

View File

@ -81,6 +81,9 @@ public class InvoiceController : Controller {
var service = new ChargeService(); var service = new ChargeService();
Charge charge = service.Create(options); Charge charge = service.Create(options);
if (charge.FailureMessage is not null && charge.FailureMessage != "")
return Json(charge.ToJson());
try { try {
_context.Invoices.Update(inv); _context.Invoices.Update(inv);
_context.SaveChanges(); _context.SaveChanges();