libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit a9e9e30adcede04a0d409a5fc9bd032762ff9e66
parent 5b9bdf0f1a14a11beb1a30de38febc085050739e
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Mon, 16 Mar 2020 19:37:33 +0100

More state for payments.

The Nexus needs to flag a payment as "invalid" when
- for some reason - the bank refuses to perform it.

Note that CRZ does not always help with this: for example,
if a payment is a invalid PAIN.001, it does not show up in
a CRZ response; therefore the only way to detect it it is
to certify its ABSENCE in a C52/C53 response.

Diffstat:
Mnexus/src/main/kotlin/tech/libeufin/nexus/DB.kt | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt @@ -69,7 +69,15 @@ object Pain001Table : IntIdTableWithAmount() { val creditorIban = text("creditorIban") val creditorBic = text("creditorBic") val creditorName = text("creditorName") - val submitted = bool("submitted").default(false) // indicates whether the PAIN message was sent to the bank. + + /* Indicates whether the PAIN message was sent to the bank. */ + val submitted = bool("submitted").default(false) + + /* Indicates whether the bank didn't perform the payment: note that + * this state can be reached when the payment gets listed in a CRZ + * response OR when the payment doesn's show up in a C52/C53 response + */ + val invalid = bool("invalid").default(false) } class Pain001Entity(id: EntityID<Int>) : IntEntity(id) { @@ -85,6 +93,7 @@ class Pain001Entity(id: EntityID<Int>) : IntEntity(id) { var creditorBic by Pain001Table.creditorBic var creditorName by Pain001Table.creditorName var submitted by Pain001Table.submitted + var invalid by Pain001Table.invalid } object EbicsAccountsInfoTable : IdTable<String>() {