[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: automatic payment submission
From: |
gnunet |
Subject: |
[libeufin] branch master updated: automatic payment submission |
Date: |
Sat, 06 Jun 2020 02:06:03 +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 accd4f5 automatic payment submission
accd4f5 is described below
commit accd4f5052a33abff75ecdec6b9b95bf9f37daae
Author: MS <ms@taler.net>
AuthorDate: Sat Jun 6 02:05:50 2020 +0200
automatic payment submission
---
nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt | 5 +++--
nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt | 2 ++
.../src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt | 3 +++
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
index 3809708..d4af549 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
@@ -264,8 +264,9 @@ fun schedulePeriodicWork() {
logger.debug("Outer background job")
try {
delay(Duration.ofSeconds(1))
- downloadTalerFacadesTransactions(this)
+ downloadTalerFacadesTransactions()
ingestTalerTransactions()
+ submitPreparedPaymentsViaEbics()
} catch (e: Exception) {
logger.info("==== Background job exception
====\n${e.message}======")
}
@@ -274,7 +275,7 @@ fun schedulePeriodicWork() {
}
/** Crawls all the facades, and requests history for each of its creators. */
-suspend fun downloadTalerFacadesTransactions(myScope: CoroutineScope) {
+suspend fun downloadTalerFacadesTransactions() {
val httpClient = HttpClient()
val work = mutableListOf<Pair<String, String>>()
transaction {
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
index 15e45be..0b9f485 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
@@ -402,6 +402,8 @@ suspend fun submitPreparedPaymentsViaEbics() {
val pain001document = createPain001document(it)
val subscriberDetails =
getEbicsSubscriberDetailsInternal(subscriberEntity)
workQueue.add(EbicsSubmission(subscriberDetails,
pain001document))
+ // FIXME: the payment must be flagger AFTER the submission
happens.
+ it.submitted = true
}
}
}
diff --git
a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
index caec791..59d925d 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
@@ -155,6 +155,9 @@ fun buildCamtString(type: Int, subscriberIban: String,
history: MutableList<RawP
*/
val ret = mutableListOf<String>()
history.forEach {
+ logger.debug(
+ "Building CAMT over payment: ${it.debitorIban} =>
${it.creditorIban}, ${it.currency}:${it.amount}, ${it.subject}"
+ )
val dashedDate = expectNonNull(it.date)
val now = LocalDateTime.now()
val zonedDateTime = now.toZonedString()
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: automatic payment submission,
gnunet <=