From cb26f7fb5e2849eb0ee92dc4b918e417d9ac4344 Mon Sep 17 00:00:00 2001 From: Martijn Date: Tue, 10 Oct 2023 11:07:24 +0200 Subject: [PATCH] fix(payments-plugin): list available methods for orders api --- packages/payments-plugin/src/mollie/mollie.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/payments-plugin/src/mollie/mollie.service.ts b/packages/payments-plugin/src/mollie/mollie.service.ts index da3fbf39f7..e48b7e2051 100644 --- a/packages/payments-plugin/src/mollie/mollie.service.ts +++ b/packages/payments-plugin/src/mollie/mollie.service.ts @@ -334,7 +334,8 @@ export class MollieService { throw Error(`No apiKey configured for payment method ${paymentMethodCode}`); } const client = createMollieClient({ apiKey }); - const methods = await client.methods.list(); + // We use the orders API, so list available methods for that API usage + const methods = await client.methods.list({resource: 'orders'}); return methods.map(m => ({ ...m, code: m.id,