summaryrefslogtreecommitdiff
path: root/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-06-19 00:04:49 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-06-19 00:04:49 +0530
commitf54bd1bc9f106d18ed5b562729f701bfd50eb372 (patch)
tree0d0cda97bb4ff5995223d4c4cd3a82d2cbba92af /nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
parent3fd1ce9e31104c4ccbc3b4661286bc5c92a05264 (diff)
downloadlibeufin-f54bd1bc9f106d18ed5b562729f701bfd50eb372.tar.gz
libeufin-f54bd1bc9f106d18ed5b562729f701bfd50eb372.tar.bz2
libeufin-f54bd1bc9f106d18ed5b562729f701bfd50eb372.zip
match payment initiations with bank account transactions
Diffstat (limited to 'nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt')
-rw-r--r--nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt14
1 files changed, 7 insertions, 7 deletions
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
index 4741ecbc..2b4dbc2a 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
@@ -350,7 +350,7 @@ private suspend fun talerAddIncoming(call: ApplicationCall, httpClient: HttpClie
}
-private fun ingestIncoming(payment: RawBankTransactionEntity, txDtls: TransactionDetails) {
+private fun ingestIncoming(payment: NexusBankTransactionEntity, txDtls: TransactionDetails) {
val subject = txDtls.unstructuredRemittanceInformation
val debtorName = txDtls.relatedParties.debtor?.name
if (debtorName == null) {
@@ -407,14 +407,14 @@ fun ingestTalerTransactions() {
logger.debug("Ingesting transactions for Taler facade ${facade.id.value}")
val facadeState = getTalerFacadeState(facade.id.value)
var lastId = facadeState.highestSeenMsgID
- RawBankTransactionEntity.find {
+ NexusBankTransactionEntity.find {
/** Those with exchange bank account involved */
- RawBankTransactionsTable.bankAccount eq subscriberAccount.id.value and
+ NexusBankTransactionsTable.bankAccount eq subscriberAccount.id.value and
/** Those that are booked */
- (RawBankTransactionsTable.status eq TransactionStatus.BOOK) and
+ (NexusBankTransactionsTable.status eq TransactionStatus.BOOK) and
/** Those that came later than the latest processed payment */
- (RawBankTransactionsTable.id.greater(lastId))
- }.orderBy(Pair(RawBankTransactionsTable.id, SortOrder.ASC)).forEach {
+ (NexusBankTransactionsTable.id.greater(lastId))
+ }.orderBy(Pair(NexusBankTransactionsTable.id, SortOrder.ASC)).forEach {
// Incoming payment.
val tx = jacksonObjectMapper().readValue(it.transactionJson, BankTransaction::class.java)
if (tx.isBatch) {
@@ -464,7 +464,7 @@ private suspend fun historyOutgoing(call: ApplicationCall) {
startCmpOp
}.orderTaler(delta)
reqPaymentsWithUnconfirmed.forEach {
- if (it.preparedPayment.rawConfirmation != null) {
+ if (it.preparedPayment.confirmationTransaction != null) {
reqPayments.add(it)
}
}