diff --git a/lib/mobility-core/src/Kernel/External/GSTEInvoice/Interface.hs b/lib/mobility-core/src/Kernel/External/GSTEInvoice/Interface.hs index 16d5b9efc..5619a4339 100644 --- a/lib/mobility-core/src/Kernel/External/GSTEInvoice/Interface.hs +++ b/lib/mobility-core/src/Kernel/External/GSTEInvoice/Interface.hs @@ -21,18 +21,27 @@ authenticateEInvoice :: ) => GSTEInvoiceConfig -> m EInvoiceAuthResp -authenticateEInvoice serviceConfig = case serviceConfig of - CharteredInfoEInvoiceConfig cfg -> CharteredInfo.authenticate cfg +authenticateEInvoice serviceConfig = do + logInfo $ "GSTEInvoice.authenticateEInvoice: calling GSP with config=" <> show serviceConfig + resp <- case serviceConfig of + CharteredInfoEInvoiceConfig cfg -> CharteredInfo.authenticate cfg + logInfo $ "GSTEInvoice.authenticateEInvoice: received response=" <> show resp + pure resp -- | Generate an e-invoice IRN via the configured GSP. generateEInvoice :: ( EncFlow m r, CoreMetrics m, - HasRequestId r + HasRequestId r, + MonadFlow m ) => GSTEInvoiceConfig -> Text -> CITypes.EInvoicePayload -> m EInvoiceGenerateResp -generateEInvoice serviceConfig authToken payload = case serviceConfig of - CharteredInfoEInvoiceConfig cfg -> CharteredInfo.generateInvoice cfg authToken payload +generateEInvoice serviceConfig authToken payload = do + logInfo $ "GSTEInvoice.generateEInvoice: calling GSP with payload=" <> show payload + resp <- case serviceConfig of + CharteredInfoEInvoiceConfig cfg -> CharteredInfo.generateInvoice cfg authToken payload + logInfo $ "GSTEInvoice.generateEInvoice: received response=" <> show resp + pure resp