[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: libeufin tutorial: testing up
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: libeufin tutorial: testing up to payment preparation |
Date: |
Fri, 05 Feb 2021 16:24:12 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 48fa2cce libeufin tutorial: testing up to payment preparation
48fa2cce is described below
commit 48fa2ccea16e1d0e11d5ac93049bc33df8d47119
Author: MS <ms@taler.net>
AuthorDate: Fri Feb 5 16:24:06 2021 +0100
libeufin tutorial: testing up to payment preparation
---
.../src/integrationtests/libeufin.ts | 31 ++++++++++++++++++++++
.../src/integrationtests/test-libeufin-tutorial.ts | 11 ++++++++
2 files changed, 42 insertions(+)
diff --git a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
index f55719e1..021e0663 100644
--- a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
@@ -95,6 +95,16 @@ export interface LibeufinBankAccountImportDetails {
connectionName: string;
}
+export interface LibeufinPreparedPaymentDetails {
+ creditorIban: string;
+ creditorBic: string;
+ creditorName: string;
+ subject: string;
+ amount: string;
+ currency: string;
+ nexusBankAccountName: string;
+}
+
export class LibeufinSandboxService implements LibeufinSandboxServiceInterface
{
static async create(
gc: GlobalTestState,
@@ -472,6 +482,27 @@ export class LibeufinCli {
);
console.log(stdout);
}
+
+ async preparePayment(details: LibeufinPreparedPaymentDetails): Promise<void>
{
+ const stdout = await sh(
+ this.globalTestState,
+ "libeufin-cli-preparepayment",
+ `libeufin-cli accounts prepare-payment` +
+ ` --creditor-iban=${details.creditorIban}` +
+ ` --creditor-bic=${details.creditorBic}` +
+ ` --creditor-name='${details.creditorName}'` +
+ ` --payment-subject='${details.subject}'` +
+ ` --payment-amount=${details.currency}:${details.amount}` +
+ ` ${details.nexusBankAccountName}`,
+ {
+ ...process.env,
+ LIBEUFIN_NEXUS_URL: this.cliDetails.nexusUrl,
+ LIBEUFIN_NEXUS_USERNAME: this.cliDetails.user.username,
+ LIBEUFIN_NEXUS_PASSWORD: this.cliDetails.user.password,
+ },
+ );
+ console.log(stdout);
+ }
}
export namespace LibeufinSandboxApi {
diff --git
a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts
b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts
index 559937c9..23fc9126 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-libeufin-tutorial.ts
@@ -109,4 +109,15 @@ export async function runLibeufinTutorialTest(t:
GlobalTestState) {
bankAccountImportDetails.nexusBankAccountName,
);
await
libeufinCli.transactions(bankAccountImportDetails.nexusBankAccountName);
+
+ const paymentDetails = {
+ creditorIban: "DE42500105171245624648",
+ creditorBic: "BELADEBEXXX",
+ creditorName: "Mina Musterfrau",
+ subject: "Purchase 01234",
+ amount: "1.0",
+ currency: "EUR",
+ nexusBankAccountName: bankAccountImportDetails.nexusBankAccountName,
+ };
+ await libeufinCli.preparePayment(paymentDetails);
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: libeufin tutorial: testing up to payment preparation,
gnunet <=