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

[FEATURE REQUEST] - Order API - Support for "payment.webhookUrl" request parameter #727

Open
nh-mdev opened this issue Dec 18, 2023 · 3 comments
Assignees
Labels
Feature Request New feature or request

Comments

@nh-mdev
Copy link

nh-mdev commented Dec 18, 2023

Describe the new feature

Initial Issue

Using the Order API for orders, e.g. via Payment Link, never triggers webhook requests for the associated transaction payments.

Support for "payment.webhookUrl" parameter for Order API requests.
See https://docs.mollie.com/reference/v2/orders-api/create-order#payment-specific-parameters

Describe the solution to be implemented

Two possible approaches:
a. Per default extend the Order API request paramaters by the current value of the configred webhook url.
b. Introduce an additional admin setting, e.g. checkbox, to allow flexible control of this behaviour.

@Frank-Magmodules Frank-Magmodules self-assigned this Dec 18, 2023
@Frank-Magmodules Frank-Magmodules added the Feature Request New feature or request label Dec 18, 2023
@nh-mdev
Copy link
Author

nh-mdev commented Dec 19, 2023

@Frank-Magmodules short update:

Based on @michielgerritsen 's initial input towards a quick-fix (via discord), we added the new request parameter to the following payload:
https://github.com/mollie/magento2/blob/master/etc/di.xml#L98C52-L113

This works, meaning, the mollie order now properly shows the webhook url value on it detail page.

However, the magento module's webhook logic seems to lack the required funtionality to handle this type of use case, i.e. receiving related order payment transaction updates via the webhook url.

It throws the following error:
image

  • "No order metadata found for 23456"
  • "No order found for transaction id X"

This makes "sense", since the related DB entry for this order/transaction is based on the transaction id of the mollie order entity.
image

Implementing this seems out of reach for us, cause it looks like new state has to be persisted in the DB for this to work.
Or maybe you see a way forward for us to "fix" this ourselves?

Thanks for the help so far!

@fjbender
Copy link
Contributor

Maybe worth investigating the handling of "unknown" webhook payloads when investigating #729?

@Frank-Magmodules
Copy link
Collaborator

Same idea @fjbender ; on the list!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants