From 9a87d43459f94bdff50063dad68cbd45df6de5d7 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Mon, 19 Jun 2023 17:54:21 -0500 Subject: [PATCH] Fix problem with payment confirmations --- src/ZGoBackend.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ZGoBackend.hs b/src/ZGoBackend.hs index dfb8bb7..5f261d3 100644 --- a/src/ZGoBackend.hs +++ b/src/ZGoBackend.hs @@ -1466,9 +1466,7 @@ scanPayments config pipe = do Nothing -> error "Failed to retrieve order from database" Just xO -> when - (not (qpaid xO) && - qexternalInvoice xO /= "" && - qtotalZec xO == snd x && z == qaddress xO) $ do + (not (qpaid xO) && qtotalZec xO == snd x && z == qaddress xO) $ do let sReg = mkRegex "(.*)-([a-fA-f0-9]{24})" let sResult = matchAllText sReg (T.unpack $ qsession xO) if not (null sResult) @@ -1529,7 +1527,7 @@ scanPayments config pipe = do else error "Couldn't parse externalInvoice for WooCommerce" _ -> putStrLn "Not an integration order" - else putStrLn "Not an integration order" + else liftIO $ access p master dbName $ markOrderPaid x -- | RPC methods -- | List addresses with viewing keys loaded