commit 9462c0ba34c41ceef72e89693dfdafc473872e27 parent 113a5265519b5c2c8873cd1f86fef7c751780fb1 Author: MS <ms@taler.net> Date: Mon, 18 May 2020 11:25:14 +0200 book the payment Diffstat:
| M | sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt | | | 2 | +- |
| M | sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | | | 7 | ++++++- |
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt @@ -239,7 +239,7 @@ class PaymentEntity(id: EntityID<Int>) : IntEntity(id) { var creditorIban by PaymentsTable.creditorIban var debitorIban by PaymentsTable.debitorIban var subject by PaymentsTable.subject - var amount by PaymentsTable.amount + var amount by PaymentsTable.amount /** in the CURRENCY:X.Y format */ var date by PaymentsTable.date /** Date when the payment was persisted in this system. */ } diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -152,7 +152,12 @@ fun main() { post("/admin/payments") { val body = call.receive<RawPayment>() transaction { - + PaymentEntity.new { + creditorIban = body.creditorIban + debitorIban = body.debitorIban + subject = body.subject + amount = body.amount + } } call.respondText("Payment created") return@post