gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: Extra check for submitting payments.


From: gnunet
Subject: [libeufin] branch master updated: Extra check for submitting payments.
Date: Mon, 16 Mar 2020 19:45:35 +0100

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 a6ad71b  Extra check for submitting payments.
a6ad71b is described below

commit a6ad71bb7054b84ab4b8f141cb89265b7c37dede
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Mar 16 19:44:56 2020 +0100

    Extra check for submitting payments.
    
    Make sure to not re-submit payments marked
    as invalid.
---
 nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
index b0cca33..64c476a 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
@@ -44,6 +44,7 @@ import 
org.apache.commons.compress.utils.SeekableInMemoryByteChannel
 import org.jetbrains.exposed.exceptions.ExposedSQLException
 import org.jetbrains.exposed.sql.StdOutSqlLogger
 import org.jetbrains.exposed.sql.addLogger
+import org.jetbrains.exposed.sql.and
 import org.jetbrains.exposed.sql.transactions.transaction
 import org.joda.time.DateTime
 import org.slf4j.Logger
@@ -522,7 +523,7 @@ fun main() {
             post("/ebics/admin/execute-payments") {
                 val (paymentRowId, painDoc: String, debtorAccount) = 
transaction {
                     val entity = Pain001Entity.find {
-                        Pain001Table.submitted eq false
+                        (Pain001Table.submitted eq false) and 
(Pain001Table.invalid eq false)
                     }.firstOrNull() ?: throw 
NexusError(HttpStatusCode.Accepted, reason = "No ready payments found")
                     Triple(entity.id, createPain001document(entity), 
entity.debtorAccount)
                 }

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



reply via email to

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