Prechádzať zdrojové kódy

Merge branch 'master' into minor

Michael Bromley 2 rokov pred
rodič
commit
d74c4eb1bb

+ 8 - 0
CHANGELOG.md

@@ -1,3 +1,11 @@
+## <small>2.0.10 (2023-10-11)</small>
+
+
+#### Fixes
+
+* **core** Use correct Money type on ProductVariantPrice.price field ([446f61c](https://github.com/vendure-ecommerce/vendure/commit/446f61c))
+* **payments-plugin** List missing available Mollie payment methods for orders api (#2435) ([23a0499](https://github.com/vendure-ecommerce/vendure/commit/23a0499)), closes [#2435](https://github.com/vendure-ecommerce/vendure/issues/2435)
+
 ## <small>2.0.9 (2023-09-29)</small>
 
 

+ 1 - 1
packages/payments-plugin/e2e/mollie-payment.e2e-spec.ts

@@ -349,7 +349,7 @@ describe('Mollie payments (with useDynamicRedirectUrl set to true)', () => {
 
         it('Should get available paymentMethods', async () => {
             nock('https://api.mollie.com/')
-                .get('/v2/methods')
+                .get('/v2/methods?resource=orders')
                 .reply(200, mockData.molliePaymentMethodsResponse);
             await shopClient.asUserWithCredentials(customers[0].emailAddress, 'test');
             const { molliePaymentMethods } = await shopClient.query(GET_MOLLIE_PAYMENT_METHODS, {

+ 2 - 1
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,