I’m building a shop using Merx and I’m building a custom payment gateway for Mollie.
Mollie calls a webhook on my server using POST. To test if it’s called, I’m simply updating a page title, but it does not seem to work. If I remove the post method and call the webhook manually (by visiting the route) the page title does get updated.
However, Mollie’s admin panel is telling me it successfully called the webhook.
'routes' => [
[
'pattern' => 'webhook',
'method' => 'post',
'action' => function () {
try {
page('catering')->update([
'title' => 'mollie-called-webhook',
]);
} catch(Exception $e) {
echo $e->getMessage();
}
}
],