diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/headless/taler-wallet-cli.ts | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/headless/taler-wallet-cli.ts b/src/headless/taler-wallet-cli.ts index 3da01a2dd..483a9e7ce 100644 --- a/src/headless/taler-wallet-cli.ts +++ b/src/headless/taler-wallet-cli.ts @@ -623,12 +623,18 @@ testCli .requiredOption("amount", ["-a", "--amount"], clk.STRING, { default: "TESTKUDOS:10", }) + .maybeOption("merchant", ["-m", "--merchant"], clk.STRING, { + default: "https://backend.test.taler.net/", + }) + .maybeOption("merchantApiKey", ["-k", "--merchant-api-key"], clk.STRING, { + default: "sandbox", + }) .action(async (args) => { const merchantBackend = new MerchantBackendConnection( - "https://backend.test.taler.net/", - "sandbox", + args.genTipUri.merchant ?? "https://backend.test.taler.net/", + args.genTipUri.merchantApiKey ?? "sandbox", ); - const tipUri = await merchantBackend.authorizeTip("TESTKUDOS:10", "test"); + const tipUri = await merchantBackend.authorizeTip(args.genTipUri.amount, "test"); console.log(tipUri); }); @@ -662,11 +668,17 @@ testCli .requiredOption("summary", ["-s", "--summary"], clk.STRING, { default: "Test Payment (for refund)", }) + .maybeOption("merchant", ["-m", "--merchant"], clk.STRING, { + default: "https://backend.test.taler.net/", + }) + .maybeOption("merchantApiKey", ["-k", "--merchant-api-key"], clk.STRING, { + default: "sandbox", + }) .action(async (args) => { const cmdArgs = args.genRefundUri; const merchantBackend = new MerchantBackendConnection( - "https://backend.test.taler.net/", - "sandbox", + cmdArgs.merchant ?? "https://backend.test.taler.net/", + cmdArgs.merchantApiKey ?? "sandbox", ); const orderResp = await merchantBackend.createOrder( cmdArgs.amount, |