gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: Link fresh CAMT entries to exchange-re


From: gnunet
Subject: [libeufin] branch master updated: Link fresh CAMT entries to exchange-requested payments.
Date: Mon, 13 Apr 2020 18:57:51 +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 112cf99  Link fresh CAMT entries to exchange-requested payments.
112cf99 is described below

commit 112cf9902cd86f60cac8589d540571b44a1dcd45
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Apr 13 18:57:21 2020 +0200

    Link fresh CAMT entries to exchange-requested payments.
---
 nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
index 1244109..e9221b6 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
@@ -289,17 +289,18 @@ class Taler(app: Route) {
         /** This endpoint triggers the examination of raw incoming payments 
aimed
          * at separating the good payments (those that will lead to a new 
reserve
          * being created), from the invalid payments (those with a invalid 
subject
-         * that will soon be refunded.) */
-        app.post("/ebics/taler/{id}/crunch-incoming-transactions") {
+         * that will soon be refunded.)  Recently, the examination of raw 
OUTGOING
+         * payment was added as well.
+         */
+        app.post("/ebics/taler/{id}/crunch-raw-transactions") {
             val id = expectId(call.parameters["id"])
             // first find highest ID value of already processed rows.
             transaction {
                 val subscriberAccount = getBankAccountsInfoFromId(id).first()
-
                 /**
                  * Search for fresh INCOMING transactions having a BOOK 
status.  Cancellations and
                  * other status changes will (1) be _appended_ to the payment 
history, and (2) be
-                 * handled _independently_ another dedicated routine.
+                 * handled _independently_ by another dedicated routine.
                  */
                 val latestIncomingPaymentId: Long = 
TalerIncomingPaymentEntity.getLast()
                 EbicsRawBankTransactionEntity.find {
@@ -330,9 +331,16 @@ class Taler(app: Route) {
                     EbicsRawBankTransactionsTable.id greater 
latestOutgoingPaymentId and
                             (EbicsRawBankTransactionsTable.status eq "BOOK")
                 }.forEach {
-                    
+                    var talerRequested = TalerRequestedPaymentEntity.find {
+                        TalerRequestedPayments.wtid eq 
it.unstructuredRemittanceInformation
+                    }.firstOrNull() ?: throw NexusError(
+                        HttpStatusCode.InternalServerError,
+                        "Unrecognized fresh outgoing payment met (subject: 
${it.unstructuredRemittanceInformation})."
+                    )
+                    talerRequested.rawConfirmed = it
                 }
             }
+
             call.respondText (
                 "New raw payments Taler-processed",
                 ContentType.Text.Plain,

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



reply via email to

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