From 8fa744abe3f6e7d501aa1e165821b4cb115a99f0 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 1 Aug 2019 23:28:07 +0200 Subject: [PATCH] check payment success --- src/headless/taler-wallet-cli.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/headless/taler-wallet-cli.ts b/src/headless/taler-wallet-cli.ts index 9336d69b0..f6a630e74 100644 --- a/src/headless/taler-wallet-cli.ts +++ b/src/headless/taler-wallet-cli.ts @@ -342,6 +342,10 @@ async function main() { console.log("payment status after wallet payment:", paymentStatus2); + if (!paymentStatus.paid) { + throw Error("payment did not succeed"); + } + myWallet.stop(); }