aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-10-07 16:21:49 +0200
committerFlorian Dold <florian@dold.me>2024-10-07 16:21:49 +0200
commit4a787439b9cb9f3e4d5a4ff4a0c66b7188d29c21 (patch)
tree923fbe878d8a0b45478f93aa1b7a050310ded7dd /packages/taler-harness/src
parentdda8a59cc86a472481dbd629e1afa7154c9367b8 (diff)
harness: create order to force merchant to update KYC status
Diffstat (limited to 'packages/taler-harness/src')
-rw-r--r--packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit.ts19
1 files changed, 17 insertions, 2 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit.ts b/packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit.ts
index 0b074c138..accd0e90f 100644
--- a/packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit.ts
+++ b/packages/taler-harness/src/integrationtests/test-kyc-merchant-deposit.ts
@@ -204,9 +204,24 @@ export async function runKycMerchantDepositTest(t: GlobalTestState) {
paytoHash: encodeCrock(hashPaytoUri(kycRespTwo.kyc_data[0].payto_uri)),
});
- // We do this in a loop as a work-around.
- // Not exactly the correct behavior from the merchant right now.
while (true) {
+ // We first POST an order to trigger checking of the KYC status,
+ // as no requirement is active.
+ let url = new URL("private/orders", merchant.makeInstanceBaseUrl());
+ const order = {
+ summary: "Test",
+ amount: "TESTKUDOS:5",
+ fulfillment_url: "taler://fulfillment-success/thx",
+ } satisfies TalerMerchantApi.Order;
+ const postOrderResp = await harnessHttpLib.fetch(url.href, {
+ method: "POST",
+ body: {
+ order,
+ },
+ });
+
+ logger.info(`POST /private/orders status: ${postOrderResp.status}`);
+
const kycStatusLongpollUrl = new URL(
"private/kyc",
merchant.makeInstanceBaseUrl(),