From eaa5aba4e21dbf86a27860575f8f22a80993e0f3 Mon Sep 17 00:00:00 2001 From: MS Date: Fri, 30 Apr 2021 11:45:47 +0200 Subject: Testing: done with simple refund case. --- .../src/integrationtests/libeufin.ts | 26 ++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'packages/taler-wallet-cli/src/integrationtests/libeufin.ts') diff --git a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts index a60127191..480dadbe5 100644 --- a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts +++ b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts @@ -784,6 +784,28 @@ export namespace LibeufinNexusApi { ); } + export async function submitInitiatedPayment( + libeufinNexusService: LibeufinNexusServiceInterface, + accountName: string, + paymentId: string, + ): Promise { + const baseUrl = libeufinNexusService.baseUrl; + let url = new URL( + `bank-accounts/${accountName}/payment-initiations/${paymentId}/submit`, + baseUrl, + ); + await axios.post( + url.href, + {}, + { + auth: { + username: "admin", + password: "test", + }, + }, + ); + } + export async function fetchAccounts( libeufinNexusService: LibeufinNexusServiceInterface, connectionName: string, @@ -874,6 +896,8 @@ export namespace LibeufinNexusApi { JSON.stringify(response.data, null, 2)); } + // FIXME: this function should return some structured + // object that represents a history. export async function getAccountTransactions( libeufinNexusService: LibeufinNexusService, accountName: string, @@ -894,8 +918,6 @@ export namespace LibeufinNexusApi { }, }, ); - console.log(`History of account: ${accountName}`, - JSON.stringify(response.data, null, 2)); } -- cgit v1.2.3