[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Fix XPath.
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Fix XPath. |
Date: |
Thu, 14 May 2020 21:25:56 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new 0698acd Fix XPath.
0698acd is described below
commit 0698acd55d400bbc1da2eff9b3fa8491bf55e2fc
Author: MS <address@hidden>
AuthorDate: Thu May 14 21:25:24 2020 +0200
Fix XPath.
---
integration-tests/test-ebics-new.py | 21 ++++++++++-----------
.../src/main/kotlin/tech/libeufin/nexus/Helpers.kt | 5 ++++-
.../tech/libeufin/sandbox/EbicsProtocolBackend.kt | 2 +-
3 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/integration-tests/test-ebics-new.py
b/integration-tests/test-ebics-new.py
index 77d9777..cc960cc 100755
--- a/integration-tests/test-ebics-new.py
+++ b/integration-tests/test-ebics-new.py
@@ -30,7 +30,8 @@ import base64
# 4 Verify that history is empty.
# 5 Issue a payment from Nexus
# -> (a) Prepare & (b) trigger CCT.
-# 6 Request history again, from Nexus to Bank.
+# 6 Request history after submitting the payment,
+# from Nexus to Bank.
# 7 Verify that previous payment shows up.
# Nexus user details
@@ -246,7 +247,7 @@ assertResponse(
)
)
-#3, request history to Nexus
+#3, ask nexus to download history
assertResponse(
post(
"http://localhost:5001/bank-accounts/collected-transactions",
@@ -293,24 +294,22 @@ assertResponse(
)
)
-nexus.terminate()
-sandbox.terminate()
-exit(44)
-
-#6
+#6, request history after payment submission
assertResponse(
post(
-
"http://localhost:5001/ebics/subscribers/{}/collect-transactions-c53".format(USERNAME),
- json=dict()
+ "http://localhost:5001/bank-accounts/collected-transactions",
+ json=dict(),
+ headers=dict(Authorization=USER_AUTHORIZATION_HEADER)
)
)
resp = assertResponse(
get(
- "http://localhost:5001/users/{}/history".format(USERNAME)
+
"http://localhost:5001/bank-accounts/{}/collected-transactions".format(BANK_ACCOUNT_LABEL),
+ headers=dict(Authorization=USER_AUTHORIZATION_HEADER)
)
)
-assert(len(resp.json().get("payments")) == 1)
+assert(len(resp.json().get("transactions")) == 1)
nexus.terminate()
sandbox.terminate()
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Helpers.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/Helpers.kt
index 5523af1..cd54e81 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Helpers.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Helpers.kt
@@ -195,7 +195,10 @@ suspend fun downloadAndPersistC5xEbics(
val camt53doc = XMLUtil.parseStringIntoDom(it.second)
transaction {
RawBankTransactionEntity.new {
- bankAccount =
getBankAccountFromIban(camt53doc.pickString("//*[local-name()='Stmt']/Acct/Id/IBAN"))
+ bankAccount = getBankAccountFromIban(
+ camt53doc.pickString(
+
"//*[local-name()='Stmt']/*[local-name()='Acct']/*[local-name()='Id']/*[local-name()='IBAN']")
+ )
sourceFileName = fileName
unstructuredRemittanceInformation =
camt53doc.pickString("//*[local-name()='Ntry']//*[local-name()='Ustrd']")
transactionType =
camt53doc.pickString("//*[local-name()='Ntry']//*[local-name()='CdtDbtInd']")
diff --git
a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
index b0348a7..f6f9801 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
@@ -205,7 +205,7 @@ fun buildCamtString(type: Int, history:
MutableList<RawPayment>): MutableList<St
element("Acct") {
// mandatory account identifier
element("Id/IBAN") {
- text("Owner IBAN")
+ text(it.debitorIban)
}
element("Ccy") {
text("EUR")
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: Fix XPath.,
gnunet <=