diff options
author | MS <ms@taler.net> | 2023-04-01 22:06:11 +0200 |
---|---|---|
committer | MS <ms@taler.net> | 2023-04-01 22:06:11 +0200 |
commit | 04c5aa01c3b57e3c0c30795c0d9fdf0aeab10844 (patch) | |
tree | 76dc9f159bfe417f37d6aa47750ebe7d0923e0b0 /sandbox/src/main/kotlin/tech/libeufin | |
parent | cf0c4ebfb782e3262cd4241d547d2d855c625e83 (diff) | |
download | libeufin-04c5aa01c3b57e3c0c30795c0d9fdf0aeab10844.tar.gz libeufin-04c5aa01c3b57e3c0c30795c0d9fdf0aeab10844.tar.bz2 libeufin-04c5aa01c3b57e3c0c30795c0d9fdf0aeab10844.zip |
x-libeufin-bank connection.
Adding payment submission, the "connect()"
method, and the CLI command to create a new
x-libeufin-bank connection.
Diffstat (limited to 'sandbox/src/main/kotlin/tech/libeufin')
-rw-r--r-- | sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt | 11 | ||||
-rw-r--r-- | sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 5 |
2 files changed, 3 insertions, 13 deletions
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt index 87021146..dac660da 100644 --- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt +++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt @@ -19,7 +19,6 @@ package tech.libeufin.sandbox -import com.fasterxml.jackson.annotation.JsonProperty import tech.libeufin.util.PaymentInfo data class WithdrawalRequest( @@ -148,16 +147,6 @@ data class TalerWithdrawalSelection( val selected_exchange: String? ) -data class NewTransactionReq( - /** - * This Payto address must contain the wire transfer - * subject among its query parameters -- 'message' parameter. - */ - val paytoUri: String, - // $currency:X.Y format - val amount: String? -) - data class SandboxConfig( val currency: String, val version: String, diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt index a1a4d70b..9cc331d2 100644 --- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt +++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -1259,7 +1259,7 @@ val sandboxApp: Application.() -> Unit = { val authGranted: Boolean = !WITH_AUTH if (!authGranted && username != bankAccount.label) throw unauthorized("Username '$username' has no rights over bank account ${bankAccount.label}") - val req = call.receive<NewTransactionReq>() + val req = call.receive<XLibeufinBankPaytoReq>() val payto = parsePayto(req.paytoUri) val amount: String? = payto.amount ?: req.amount if (amount == null) throw badRequest("Amount is missing") @@ -1274,7 +1274,8 @@ val sandboxApp: Application.() -> Unit = { subject = payto.message ?: throw badRequest( "'message' query parameter missing in Payto address" ), - amount = amount + amount = amount, + pmtInfId = req.pmtInfId ) } call.respond(object {}) |