Fix problem with payment confirmations

This commit is contained in:
Rene Vergara 2023-06-19 17:54:21 -05:00
parent f21700f88b
commit 9a87d43459
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2

View file

@ -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