summaryrefslogtreecommitdiff
path: root/packages/taler-integrationtests/src/test-payment.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-integrationtests/src/test-payment.ts')
-rw-r--r--packages/taler-integrationtests/src/test-payment.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/taler-integrationtests/src/test-payment.ts b/packages/taler-integrationtests/src/test-payment.ts
index 3fd879580..77645909c 100644
--- a/packages/taler-integrationtests/src/test-payment.ts
+++ b/packages/taler-integrationtests/src/test-payment.ts
@@ -19,6 +19,7 @@
*/
import { runTest, GlobalTestState } from "./harness";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers";
+import { PreparePayResultType } from "taler-wallet-core";
/**
* Run test for basic, bank-integrated withdrawal.
@@ -56,14 +57,15 @@ runTest(async (t: GlobalTestState) => {
// Make wallet pay for the order
- const r1 = await wallet.apiRequest("preparePay", {
+ const preparePayResult = await wallet.preparePay({
talerPayUri: orderStatus.taler_pay_uri,
});
- t.assertTrue(r1.type === "response");
+
+ t.assertTrue(preparePayResult.status === PreparePayResultType.PaymentPossible);
const r2 = await wallet.apiRequest("confirmPay", {
// FIXME: should be validated, don't cast!
- proposalId: (r1.result as any).proposalId,
+ proposalId: preparePayResult.proposalId,
});
t.assertTrue(r2.type === "response");