gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: comments, var renaming


From: gnunet
Subject: [libeufin] branch master updated: comments, var renaming
Date: Mon, 21 Nov 2022 20:19:29 +0100

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 1f70330a comments, var renaming
1f70330a is described below

commit 1f70330aa38dc80e188cfc4b991aa19c15aef485
Author: MS <ms@taler.net>
AuthorDate: Mon Nov 21 20:19:00 2022 +0100

    comments, var renaming
---
 nexus/src/main/kotlin/tech/libeufin/nexus/Scheduling.kt              | 1 -
 nexus/src/main/kotlin/tech/libeufin/nexus/bankaccount/BankAccount.kt | 1 +
 nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt       | 5 ++---
 nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsNexus.kt        | 4 +++-
 .../src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt    | 2 +-
 5 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Scheduling.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/Scheduling.kt
index 73442692..09c4bcc2 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Scheduling.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Scheduling.kt
@@ -48,7 +48,6 @@ private data class TaskSchedule(
 private suspend fun runTask(client: HttpClient, sched: TaskSchedule) {
     logger.info("running task $sched")
     try {
-
         when (sched.resourceType) {
             "bank-account" -> {
                 when (sched.type) {
diff --git 
a/nexus/src/main/kotlin/tech/libeufin/nexus/bankaccount/BankAccount.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/bankaccount/BankAccount.kt
index 9afde31d..c3ac4313 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/bankaccount/BankAccount.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/bankaccount/BankAccount.kt
@@ -89,6 +89,7 @@ suspend fun submitAllPaymentInitiations(httpClient: 
HttpClient, accountid: Strin
             (PaymentInitiationsTable.submitted eq false) and (
                     PaymentInitiationsTable.bankAccount eq account.id)
         }.forEach {
+            // Filter out non EBICS.
             val defaultBankConnectionId = 
it.bankAccount.defaultBankConnection?.id ?: throw NexusError(
                 HttpStatusCode.BadRequest,
                 "needs default bank connection"
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt
index 1af5a7b2..281410d5 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsClient.kt
@@ -26,7 +26,6 @@ import io.ktor.client.HttpClient
 import io.ktor.client.features.*
 import io.ktor.client.request.*
 import io.ktor.http.*
-import io.ktor.util.*
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
 import tech.libeufin.nexus.NexusError
@@ -223,7 +222,7 @@ suspend fun doEbicsUploadTransaction(
     logger.debug("INIT phase passed!")
     /* now send actual payload */
 
-    val tmp = createEbicsRequestForUploadTransferPhase(
+    val payload = createEbicsRequestForUploadTransferPhase(
         subscriberDetails,
         transactionID,
         preparedUploadData,
@@ -232,7 +231,7 @@ suspend fun doEbicsUploadTransaction(
 
     val txRespStr = client.postToBank(
         subscriberDetails.ebicsUrl,
-        tmp
+        payload
     )
 
     val txResp = parseAndValidateEbicsResponse(subscriberDetails, txRespStr)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsNexus.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsNexus.kt
index 2e22a68f..a5371599 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsNexus.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/ebics/EbicsNexus.kt
@@ -112,7 +112,8 @@ private suspend fun fetchEbicsC5x(
         )
     } catch (e: EbicsProtocolError) {
         /**
-         * This error type is not an actual error in this handler.
+         * Although given a error type, a empty transactions list does
+         * not mean anything wrong.
          */
         if (e.ebicsTechnicalCode == 
EbicsReturnCode.EBICS_NO_DOWNLOAD_DATA_AVAILABLE) {
             logger.info("Could not find new transactions to download")
@@ -543,6 +544,7 @@ class EbicsBankConnectionProtocol: BankConnectionProtocol {
             r.painMessage.toByteArray(Charsets.UTF_8),
             EbicsStandardOrderParams()
         )
+        // Mark the payment as submitted.
         transaction {
             val paymentInitiation = 
PaymentInitiationEntity.findById(paymentInitiationId)
                 ?: throw NexusError(HttpStatusCode.NotFound, "payment 
initiation not found")
diff --git 
a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
index 814874c9..fd3524ad 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
@@ -283,7 +283,7 @@ fun buildCamtString(
      * - Proprietary code of the bank transaction
      * - Id of the servicer (Issuer and Code)
      */
-    val creationTime = getUTCnow()
+    val creationTime = getUTCnow() // FIXME: should this be the payment time?
     val dashedDate = creationTime.toDashedDate()
     val zonedDateTime = creationTime.toZonedString()
     val creationTimeMillis = creationTime.toInstant().toEpochMilli()

-- 
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]