[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: first steps for PAIN.002 download
From: |
gnunet |
Subject: |
[libeufin] branch master updated: first steps for PAIN.002 download |
Date: |
Wed, 04 Mar 2020 16:54:50 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new d460343 first steps for PAIN.002 download
d460343 is described below
commit d46034385b9cf87b1e7690327b6619aba724bfe8
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Mar 4 16:54:28 2020 +0100
first steps for PAIN.002 download
---
nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
index c77e318..f8146e8 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
@@ -513,6 +513,9 @@ fun main() {
return@post
}
+ /**
+ * list all the payments related to customer {id}
+ */
get("/ebics/subscribers/{id}/payments") {
val id = expectId(call.parameters["id"])
@@ -557,7 +560,7 @@ fun main() {
}
logger.info("Processing payment for bank account:
${debtorAccount}")
val subscriberDetails =
getSubscriberDetailsFromBankAccount(debtorAccount)
- val response = doEbicsUploadTransaction(
+ doEbicsUploadTransaction(
client,
subscriberDetails,
"CCC",
@@ -565,7 +568,7 @@ fun main() {
EbicsStandardOrderParams()
)
call.respondText(
- response.toString(),
+ "CCC message submitted to the bank",
ContentType.Text.Plain,
HttpStatusCode.OK
)
@@ -574,6 +577,18 @@ fun main() {
post("/ebics/subscribers/{id}/fetch-payment-status") {
// FIXME(marcello?): Fetch pain.002 and mark transfers in it
as "failed"
+ val id = expectId(call.parameters["id"])
+ val subscriberData = getSubscriberDetailsFromId(id)
+ val response = doEbicsDownloadTransaction(client,
subscriberData, "CRZ", EbicsStandardOrderParams())
+ when (response) {
+ is EbicsDownloadSuccessResult ->
+ call.respondText(
+ response.orderData.toString(Charsets.UTF_8),
+ ContentType.Text.Plain,
+ HttpStatusCode.OK)
+ else -> call.respond(NexusErrorJson("Could not download
any PAIN.002"))
+ }
+ return@post
}
post("/ebics/subscribers/{id}/collect-transactions-c52") {
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: first steps for PAIN.002 download,
gnunet <=