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

Update payment not supported? #128

Closed
Christilut opened this issue Feb 1, 2020 · 8 comments
Closed

Update payment not supported? #128

Christilut opened this issue Feb 1, 2020 · 8 comments

Comments

@Christilut
Copy link

It says the Payment update() method is not supported in the v2 API, but the v2 API does show this method: https://docs.mollie.com/reference/v2/payments-api/update-payment

Is it just not implemented yet in the nodejs client?

@Pimm
Copy link
Collaborator

Pimm commented Feb 3, 2020

That is correct: it has not been implemented in this library yet.

There are plans to fill up the gaps in this library in the near future.

@Christilut
Copy link
Author

Okay. I thought I'd give it a go but I ran into some problems.

Got lots of these when I tried running the tests:

 FAIL  tests/unit/models/refund.test.ts
  ● Test suite failed to run

    Cannot find module '..' from 'wireMockClient.ts'

    However, Jest was able to find:
        '../../wireMockClient.ts'

And I don't see any documentation about contributing so not sure what to do here.

Also you might want to switch from yarn back to npm because I think Facebook kind of abandoned yarn, there's just 1 developer on it now that made yarn v2.

@lmolema
Copy link

lmolema commented May 15, 2020

@Christilut did you made any progress on this in the meantime?

@Christilut
Copy link
Author

I just do a REST call manually for the UPDATE payment:

export async function sendMollieRest(method: 'PATCH', url: string, data: object) {
  if (env.NODE_ENV !== env.Environments.Test) {
    await Axios({
      method,
      url,
      headers: {
        Authorization: `Bearer ${env.MOLLIE_API_KEY}`
      },
      data
    })
  }
}

@Pimm
Copy link
Collaborator

Pimm commented May 15, 2020

We have a PR ready. We plan to make a new beta release which includes this endpoint on Monday.

@lmolema
Copy link

lmolema commented May 15, 2020

@Christilut thanks!

@Pimm Thats great, I can wait for Monday :)

@vernondegoede
Copy link
Contributor

vernondegoede commented May 18, 2020

@Christilut @lmolema We just released 3.2.0-beta.1, which includes this functionality. More information can be found here: https://github.com/mollie/mollie-api-node/releases/tag/v3.2.0-beta.1

Please note that this is a beta. Let us know if you run into any issues!

@lmolema
Copy link

lmolema commented May 18, 2020

@vernondegoede Great! I am testing it and so far it works as expected and no issues!

@Pimm Pimm closed this as completed May 21, 2020
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

4 participants