commit 4a787439b9cb9f3e4d5a4ff4a0c66b7188d29c21
parent dda8a59cc86a472481dbd629e1afa7154c9367b8
Author: Florian Dold <florian@dold.me>
Date: Mon, 7 Oct 2024 16:21:49 +0200
harness: create order to force merchant to update KYC status
Diffstat:
1 file 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
@@ -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(),