Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to get payments for an order #391

Open
martijnvdbrug opened this issue Nov 12, 2024 · 0 comments
Open

Error when trying to get payments for an order #391

martijnvdbrug opened this issue Nov 12, 2024 · 0 comments

Comments

@martijnvdbrug
Copy link

martijnvdbrug commented Nov 12, 2024

Hi! I am one of the maintainers of the Vendure Mollie integration, and we use the Mollie Node client. After upgrading to V4 I can not seem to get payments of an order anymore, it results in #<Object> is not a constructor.

Run this script to reproduce:

// repro.js

import { createMollieClient } from "@mollie/api-client"; // Both v4.1.0 and 4.0.0 have this issue, 3.7.0 works

const apiKey = "test_xxxx";
const orderId = "ord_1.acekxu"; // An order with status Paid

(async () => {
    const mollieClient = createMollieClient({ apiKey });
    const mollieOrder = await mollieClient.orders.get(orderId);
    const molliePayments = await mollieOrder.getPayments(); // This throws the error
    console.log(molliePayments);
})();

Using node 18, run node ./reproduce.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant