[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated (d708771e -> 6f1c95a8)
From: |
gnunet |
Subject: |
[libeufin] branch master updated (d708771e -> 6f1c95a8) |
Date: |
Mon, 04 Jul 2022 16:22:23 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a change to branch master
in repository libeufin.
from d708771e respond 404 on demobank not found
new f2fcab7b CLI option to submit all payments
new 6f1c95a8 remove hard-coded currency
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
cli/bin/libeufin-cli | 26 ++++++++++++++--------
.../tech/libeufin/sandbox/EbicsProtocolBackend.kt | 9 ++++----
2 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/cli/bin/libeufin-cli b/cli/bin/libeufin-cli
index 9e6da423..5ccb0663 100755
--- a/cli/bin/libeufin-cli
+++ b/cli/bin/libeufin-cli
@@ -800,17 +800,25 @@ def prepare_payment(
check_response_status(resp)
-@accounts.command(help="Submit a payment initiation")
-@click.option("--payment-uuid", help="payment unique identifier",
required=True)
+@accounts.command(help="Submit a payment initiation. Submit every new payment
if invoked without options.")
+@click.option("--payment-uuid", help="Payment unique identifier. Submits only
this payment.")
@click.argument("account-name")
@click.pass_obj
-def submit_payment(obj, account_name, payment_uuid):
- url = urljoin_nodrop(
- obj.nexus_base_url,
- "/bank-accounts/{}/payment-initiations/{}/submit".format(
- account_name, payment_uuid
- ),
- )
+def submit_payments(obj, account_name, payment_uuid):
+ if payment_uuid:
+ url = urljoin_nodrop(
+ obj.nexus_base_url,
+ "/bank-accounts/{}/payment-initiations/{}/submit".format(
+ account_name, payment_uuid
+ ),
+ )
+ else:
+ url = urljoin_nodrop(
+ obj.nexus_base_url,
+ "/bank-accounts/{}/submit-all-payment-initiations".format(
+ account_name
+ ),
+ )
try:
resp = post(
url, json=dict(), auth=auth.HTTPBasicAuth(obj.username,
obj.password)
diff --git
a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
index 6d145934..4b0ec286 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
@@ -284,6 +284,7 @@ fun buildCamtString(
val zonedDateTime = creationTime.toZonedString()
val creationTimeMillis = creationTime.toInstant().toEpochMilli()
val messageId = "sandbox-${creationTimeMillis}"
+ val currency = getDefaultDemobank().currency
val camtMessage = constructXml(indent = true) {
root("Document") {
@@ -329,7 +330,7 @@ fun buildCamtString(
text(subscriberIban)
}
element("Ccy") {
- text("EUR")
+ text(currency)
}
element("Ownr/Nm") {
text("Debitor/Owner Name")
@@ -358,7 +359,7 @@ fun buildCamtString(
text("PRCD")
}
element("Amt") {
- attribute("Ccy", "EUR")
+ attribute("Ccy", currency)
text(balancePrcd.abs().toPlainString())
}
element("CdtDbtInd") {
@@ -377,7 +378,7 @@ fun buildCamtString(
text("CLBD")
}
element("Amt") {
- attribute("Ccy", "EUR")
+ attribute("Ccy", currency)
text(balanceClbd.abs().toPlainString())
}
element("CdtDbtInd") {
@@ -452,7 +453,7 @@ fun buildCamtString(
}
}
element("AmtDtls/TxAmt/Amt") {
- attribute("Ccy", "EUR")
+ attribute("Ccy", currency)
text(it.amount)
}
element("BkTxCd") {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libeufin] branch master updated (d708771e -> 6f1c95a8),
gnunet <=