diff options
author | tanhengyeow <E0032242@u.nus.edu> | 2020-08-14 17:05:12 +0800 |
---|---|---|
committer | tanhengyeow <E0032242@u.nus.edu> | 2020-08-14 17:05:12 +0800 |
commit | 9db46d5f84901f29f57edf01dffdcfea184a38e9 (patch) | |
tree | 56258ebd0a31b581fafb0c049967d26a51831f9d | |
parent | 6100ce771a23f0dd1d26701db5e95ef390e8e219 (diff) | |
download | libeufin-9db46d5f84901f29f57edf01dffdcfea184a38e9.tar.gz libeufin-9db46d5f84901f29f57edf01dffdcfea184a38e9.tar.bz2 libeufin-9db46d5f84901f29f57edf01dffdcfea184a38e9.zip |
Update instances of PaymentsTable to BankAccountTransactionsTable
-rw-r--r-- | sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt index 79cc631c..a07405d1 100644 --- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt +++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt @@ -33,18 +33,18 @@ import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.statements.api.ExposedBlob import org.jetbrains.exposed.sql.transactions.transaction import org.w3c.dom.Document -import tech.libeufin.sandbox.PaymentsTable.amount -import tech.libeufin.sandbox.PaymentsTable.creditorBic -import tech.libeufin.sandbox.PaymentsTable.creditorIban -import tech.libeufin.sandbox.PaymentsTable.creditorName -import tech.libeufin.sandbox.PaymentsTable.currency -import tech.libeufin.sandbox.PaymentsTable.date -import tech.libeufin.sandbox.PaymentsTable.debitorBic -import tech.libeufin.sandbox.PaymentsTable.debitorIban -import tech.libeufin.sandbox.PaymentsTable.debitorName -import tech.libeufin.sandbox.PaymentsTable.msgId -import tech.libeufin.sandbox.PaymentsTable.pmtInfId -import tech.libeufin.sandbox.PaymentsTable.subject +import tech.libeufin.sandbox.BankAccountTransactionsTable.amount +import tech.libeufin.sandbox.BankAccountTransactionsTable.creditorBic +import tech.libeufin.sandbox.BankAccountTransactionsTable.creditorIban +import tech.libeufin.sandbox.BankAccountTransactionsTable.creditorName +import tech.libeufin.sandbox.BankAccountTransactionsTable.currency +import tech.libeufin.sandbox.BankAccountTransactionsTable.date +import tech.libeufin.sandbox.BankAccountTransactionsTable.debitorBic +import tech.libeufin.sandbox.BankAccountTransactionsTable.debitorIban +import tech.libeufin.sandbox.BankAccountTransactionsTable.debitorName +import tech.libeufin.sandbox.BankAccountTransactionsTable.msgId +import tech.libeufin.sandbox.BankAccountTransactionsTable.pmtInfId +import tech.libeufin.sandbox.BankAccountTransactionsTable.subject import tech.libeufin.util.* import tech.libeufin.util.XMLUtil.Companion.signEbicsResponse import tech.libeufin.util.ebics_h004.* @@ -465,12 +465,12 @@ private fun constructCamtResponse( val bankAccount = getBankAccountFromSubscriber(subscriber) transaction { logger.debug("Querying transactions involving: ${bankAccount.iban}") - PaymentsTable.select { - PaymentsTable.creditorIban eq bankAccount.iban or - (PaymentsTable.debitorIban eq bankAccount.iban) + BankAccountTransactionsTable.select { + BankAccountTransactionsTable.creditorIban eq bankAccount.iban or + (BankAccountTransactionsTable.debitorIban eq bankAccount.iban) /** FIXME: add the following condition too: - and (PaymentsTable.date.between(start.millis, end.millis)) + and (BankAccountTransactionsTable.date.between(start.millis, end.millis)) */ }.forEach { history.add( @@ -571,7 +571,7 @@ private fun handleCct(paymentRequest: String, initiatorName: String, ctx: Reques val parseResult = parsePain001(paymentRequest, initiatorName) transaction { try { - PaymentsTable.insert { + BankAccountTransactionsTable.insert { it[creditorIban] = parseResult.creditorIban it[creditorName] = parseResult.creditorName it[debitorIban] = parseResult.debitorIban |