From e1c2693fa11c2f664a941d0012ab4636715ab312 Mon Sep 17 00:00:00 2001 From: elraphty Date: Mon, 9 Oct 2023 23:51:51 +0100 Subject: [PATCH] removed invoice logs --- handlers/invoiceCron.go | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/handlers/invoiceCron.go b/handlers/invoiceCron.go index 2c07c90c7..eb6c9a293 100644 --- a/handlers/invoiceCron.go +++ b/handlers/invoiceCron.go @@ -24,8 +24,6 @@ func InitInvoiceCron() { invoiceList, _ := db.Store.GetInvoiceCache() invoiceCount := len(invoiceList) - fmt.Println("Invoice Count ===", invoiceCount) - if invoiceCount > 0 { for index, inv := range invoiceList { url := fmt.Sprintf("%s/invoice?payment_request=%s", config.RelayUrl, inv.Invoice) @@ -52,15 +50,11 @@ func InitInvoiceCron() { err = json.Unmarshal(body, &invoiceRes) if err != nil { - log.Printf("Reading body failed: %s", err) + log.Printf("Reading Invoice body failed: %s", err) return } - fmt.Println("Invoice RESPONSE ===", invoiceRes) - fmt.Println("Invoice SETTLED ===", invoiceRes.Response.Settled) - if invoiceRes.Response.Settled { - fmt.Println("IS SETTLED ===", invoiceRes.Response.Settled) if inv.Invoice == invoiceRes.Response.Payment_request { /** If the invoice is settled and still in store @@ -181,8 +175,6 @@ func InitInvoiceCron() { invoiceList, _ := db.Store.GetBudgetInvoiceCache() invoiceCount := len(invoiceList) - fmt.Println("INVOICE COUNT ===", invoiceCount) - if invoiceCount > 0 { for index, inv := range invoiceList { url := fmt.Sprintf("%s/invoice?payment_request=%s", config.RelayUrl, inv.Invoice) @@ -206,18 +198,13 @@ func InitInvoiceCron() { // Unmarshal result invoiceRes := db.InvoiceResult{} - fmt.Println("Invoice RESPONSE 1 ===", invoiceRes) - fmt.Println("Invoice SETTLED ===", invoiceRes.Response.Settled) - err = json.Unmarshal(body, &invoiceRes) if err != nil { - log.Printf("Reading Invoice body failed: %s", err) + log.Printf("Reading Organization Invoice body failed: %s", err) return } - fmt.Println("Invoice RESPONSE 2 ===", invoiceRes) - if invoiceRes.Response.Settled { fmt.Sprintln("INVOICE SETTLED") if inv.Invoice == invoiceRes.Response.Payment_request {