gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: fix validation issues


From: gnunet
Subject: [libeufin] branch master updated: fix validation issues
Date: Wed, 01 Apr 2020 17:39:48 +0200

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

marcello pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 4c5b077  fix validation issues
4c5b077 is described below

commit 4c5b0777547c726cde56b7979e116bcf96c994fd
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Apr 1 17:39:30 2020 +0200

    fix validation issues
---
 nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt  |  3 --
 .../tech/libeufin/sandbox/EbicsProtocolBackend.kt  | 43 +++++++++++++---------
 2 files changed, 26 insertions(+), 20 deletions(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
index be13433..2649c04 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
@@ -819,7 +819,6 @@ fun main() {
                     }
                 }
             }
-
             post("/ebics/subscribers/{id}/sendC54") {
                 val id = expectId(call.parameters["id"])
                 val paramsJson = call.receive<EbicsStandardOrderParamsJson>()
@@ -843,7 +842,6 @@ fun main() {
                 }
                 return@post
             }
-
             get("/ebics/subscribers/{id}/sendHTD") {
                 val customerIdAtNexus = expectId(call.parameters["id"])
                 val subscriberData = 
getSubscriberDetailsFromId(customerIdAtNexus)
@@ -870,7 +868,6 @@ fun main() {
                 }
                 return@get
             }
-
             post("/ebics/subscribers/{id}/sendHAA") {
                 val id = expectId(call.parameters["id"])
                 val subscriberData = getSubscriberDetailsFromId(id)
diff --git 
a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
index 0a59fd0..fce26af 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
@@ -180,7 +180,7 @@ fun buildCamtString(history: 
SizedIterable<BankTransactionEntity>, type: Int): S
         root("Document") {
             attribute("xmlns", 
"urn:iso:std:iso:20022:tech:xsd:camt.053.001.02")
             attribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance";)
-            attribute("xmlns:schemaLocation", 
"urn:iso:std:iso:20022:tech:xsd:camt.053.001.02 camt.053.001.02.xsd")
+            attribute("xsi:schemaLocation", 
"urn:iso:std:iso:20022:tech:xsd:camt.053.001.02 camt.053.001.02.xsd")
             element("BkToCstmrStmt") {
                 element("GrpHdr") {
                     element("MsgId") {
@@ -199,9 +199,15 @@ fun buildCamtString(history: 
SizedIterable<BankTransactionEntity>, type: Int): S
                     }
                 }
                 element(if (type == 52) "Rpt" else "Stmt") {
-                    element("Id")
-                    element("ElctrncSeqNb")
-                    element("LglSeqNb")
+                    element("Id") {
+                        text("0")
+                    }
+                    element("ElctrncSeqNb") {
+                        text("0")
+                    }
+                    element("LglSeqNb") {
+                        text("0")
+                    }
                     element("CreDtTm") {
                         text(now.toZonedString())
                     }
@@ -217,9 +223,9 @@ fun buildCamtString(history: 
SizedIterable<BankTransactionEntity>, type: Int): S
                         element("Ownr/Nm") {
                             text("Max Mustermann")
                         }
-                        element("Svcr/FinInstn") {
+                        element("Svcr/FinInstnId") {
                             element("BIC") {
-                                text("XY")
+                                text("GENODEM1GLS")
                             }
                             element("Nm") {
                                 text("Libeufin Bank")
@@ -253,7 +259,7 @@ fun buildCamtString(history: 
SizedIterable<BankTransactionEntity>, type: Int): S
                         }
                         element("Dt/Dt") {
                             // date of this balance
-                            now.toDashedDate()
+                            text(now.toDashedDate())
                         }
                     }
                     element("Bal") {
@@ -277,7 +283,10 @@ fun buildCamtString(history: 
SizedIterable<BankTransactionEntity>, type: Int): S
                     }
                     // history.forEach {
                         element("Ntry") {
-                            element("Amt")
+                            element("Amt") {
+                                attribute("Ccy", "EUR")
+                                text(Amount(1).toPlainString())
+                            }
                             element("CdtDbtInd") {
                                 text("DBIT")
                             }
@@ -287,7 +296,7 @@ fun buildCamtString(history: 
SizedIterable<BankTransactionEntity>, type: Int): S
                                  * "Status of an entry on the books of the 
account servicer" */
                                 text("BOOK")
                             }
-                            element("BookDt/Dt") {
+                            element("BookgDt/Dt") {
                                 text(now.toDashedDate())
                             } // date of the booking
                             element("ValDt/Dt") {
@@ -311,13 +320,13 @@ fun buildCamtString(history: 
SizedIterable<BankTransactionEntity>, type: Int): S
                                             text("ESCT")
                                         }
                                     }
-                                    element("Prtry") {
-                                        element("Cd") {
-                                            text("0")
-                                        }
-                                        element("Issr") {
-                                            text("XY")
-                                        }
+                                }
+                                element("Prtry") {
+                                    element("Cd") {
+                                        text("0")
+                                    }
+                                    element("Issr") {
+                                        text("XY")
                                     }
                                 }
                             }
@@ -376,7 +385,7 @@ fun buildCamtString(history: 
SizedIterable<BankTransactionEntity>, type: Int): S
                                 }
                                 element("RltdAgts") {
                                     element("CdtrAgt/FinInstnId/BIC") {
-                                        text("SOGEDEFF")
+                                        text("GENODEM1GLS")
                                     }
                                 }
                                 element("RmtInf/Ustrd") {

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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