gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated (f9022c7e -> 752ec1fd)


From: gnunet
Subject: [libeufin] branch master updated (f9022c7e -> 752ec1fd)
Date: Fri, 17 Nov 2023 13:14:12 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a change to branch master
in repository libeufin.

    from f9022c7e Support conversion both ways
     new 30928f18 fixing helper call
     new 752ec1fd debug

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt  | 16 ++++++++++++++--
 .../src/main/kotlin/tech/libeufin/nexus/ebics/Ebics3.kt  |  2 +-
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt
index 168c69ec..506e8c60 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt
@@ -55,7 +55,11 @@ data class FetchContext(
      * Start date of the returned documents.  Only
      * used in --transient mode.
      */
-    var pinnedStart: Instant? = null
+    var pinnedStart: Instant? = null,
+    /**
+     * Logs to STDERR the init phase of an EBICS download request.
+     */
+    val ebicsExtraLog: Boolean = false
 )
 
 /**
@@ -91,6 +95,8 @@ private suspend inline fun downloadHelper(
             ebics2Req.orderParams
         )
     }
+    if (ctx.ebicsExtraLog)
+        logger.debug(initXml)
     try {
         return doEbicsDownload(
             ctx.httpClient,
@@ -505,6 +511,8 @@ fun ingestNotification(
     val filenamePrefix = "camt.054_P_" // Only these files have all the 
details.
     try {
         content.unzipForEach { fileName, xmlContent ->
+            if (!fileName.contains("camt.054", ignoreCase = true))
+                throw Exception("Asked for notification but did NOT get a 
camt.054")
             if (!fileName.startsWith(filenamePrefix)) return@unzipForEach
             val found = parseNotification(xmlContent, ctx.cfg.currency)
             incomingPayments += found.incoming
@@ -621,6 +629,9 @@ class EbicsFetch: CliktCommand("Fetches bank records.  
Defaults to camt.054 noti
                 "the parsing results.  It does not affect the database."
     ).flag(default = false)
 
+    private val ebicsExtraLog by option(
+        help = "Logs to STDERR the init phase of an EBICS download request"
+    ).flag(default = false)
 
     /**
      * This function collects the main steps of fetching banking records.
@@ -675,7 +686,8 @@ class EbicsFetch: CliktCommand("Fetches bank records.  
Defaults to camt.054 noti
             HttpClient(),
             clientKeys,
             bankKeys,
-            whichDoc
+            whichDoc,
+            ebicsExtraLog = ebicsExtraLog
         )
         if (transient) {
             logger.info("Transient mode: fetching once and returning.")
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/Ebics3.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/Ebics3.kt
index 1928cef0..5c8b8c2d 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/Ebics3.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/Ebics3.kt
@@ -418,6 +418,6 @@ fun prepEbics3Document(
         SupportedDocument.PAIN_002 -> prepAckRequest3(startDate)
         SupportedDocument.CAMT_052 -> prepReportRequest3(startDate)
         SupportedDocument.CAMT_053 -> prepStatementRequest3(startDate)
-        SupportedDocument.CAMT_054 -> prepReportRequest3(startDate)
+        SupportedDocument.CAMT_054 -> prepNotificationRequest3(startDate, 
isAppendix = true)
         SupportedDocument.PAIN_002_LOGS -> throw Exception("HAC (--only-logs) 
not available in EBICS 3")
     }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]