diff --git a/apps/simplex-store-service/src/StoreService/Providers/BTCPay.hs b/apps/simplex-store-service/src/StoreService/Providers/BTCPay.hs index 1a910205c6..3b55fe1190 100644 --- a/apps/simplex-store-service/src/StoreService/Providers/BTCPay.hs +++ b/apps/simplex-store-service/src/StoreService/Providers/BTCPay.hs @@ -81,8 +81,9 @@ xmrMethodId = "XMR-CHAIN" knownMethodIds :: [Text] knownMethodIds = [btcMethodId, xmrMethodId] +-- The last two are the only events a payment into a closed invoice sends. actedOnEventTypes :: [Text] -actedOnEventTypes = ["InvoiceProcessing", "InvoiceSettled", "InvoiceExpired", "InvoiceInvalid"] +actedOnEventTypes = ["InvoiceProcessing", "InvoiceSettled", "InvoiceExpired", "InvoiceInvalid", "InvoiceReceivedPayment", "InvoicePaymentSettled"] maxErrorBytes :: Int64 maxErrorBytes = 4000 diff --git a/tests/Bots/StoreService/BTCPayTests.hs b/tests/Bots/StoreService/BTCPayTests.hs index edd164c046..268faca7e8 100644 --- a/tests/Bots/StoreService/BTCPayTests.hs +++ b/tests/Bots/StoreService/BTCPayTests.hs @@ -435,7 +435,7 @@ testWebhookAccepts :: IO () testWebhookAccepts = mapM_ (\t -> let b = webhookEvent t ref in verifyEvent (webhookSigHeader secret b) b `shouldBe` Right (Just ref)) - ["InvoiceProcessing", "InvoiceSettled", "InvoiceExpired", "InvoiceInvalid"] + ["InvoiceProcessing", "InvoiceSettled", "InvoiceExpired", "InvoiceInvalid", "InvoiceReceivedPayment", "InvoicePaymentSettled"] testWebhookHeaderCase :: IO () testWebhookHeaderCase = do @@ -449,7 +449,7 @@ testWebhookUppercaseHex = do testWebhookIgnoresOtherType :: IO () testWebhookIgnoresOtherType = do - let b = webhookEvent "InvoiceReceivedPayment" ref + let b = webhookEvent "InvoiceCreated" ref verifyEvent (webhookSigHeader secret b) b `shouldBe` Right Nothing testWebhookIgnoresUnreadableBody :: IO ()