ruudk / PaymentMollieBundle

NO LONGER MAINTAINED
MIT License
15 stars 20 forks source link

Webhook not working #24

Closed beeSeen closed 7 years ago

beeSeen commented 7 years ago

I've configured the bundle but I can't seem to get the webhook working. The webhook isn't triggered by mollie.

Running the URL manually works so the routing is configured correctly. Do I need to include the webhook url explicitly in the predefined data?

ruudk commented 7 years ago

Can you verify that Mollie is able to connect to your webhook? Did you check https://www.mollie.com/beheer/tools/pending/http/ ?

beeSeen commented 7 years ago

I checked the log on https://www.mollie.com/beheer/tools/pending/http/ but it's empty.

ruudk commented 7 years ago

Maybe it doesn't show development HTTP calls. Are you sure the request comes into your application? If not, then there's the problem :)

beeSeen commented 7 years ago

I don't think that the requests are coming in but can't figure out why. Do I have to explicitly include the URL for the webhook?

ruudk commented 7 years ago

You have to set that up in Mollie, https://www.mollie.com/beheer/account/profielen/

beeSeen commented 7 years ago

Mollie documentation states as follows:

With each payment creation, you can specify the webhook for that payment by providing the parameter webhookUrl.

So I think that the webhookUrl should be included in the predefined_data?

ruudk commented 7 years ago

This bundle doesn't support that, it requires you to set it up @ mollie. If you want to have it dynamically in this bundle, please provide a PR :)

mennowame commented 7 years ago

You have to set that up in Mollie, https://www.mollie.com/beheer/account/profielen/

That's how it used to be. Mollie changed that recently. They might still support the pre configured webhook url for old implementations, but for new implementations you now have to send the webhookURL with every Payment. For more info see: https://help.mollie.com/hc/en-us/articles/115001336205-Where-can-I-set-the-webhook-in-my-account-

We are working on a PR :)

beeSeen commented 7 years ago

Thanks for you response. I've managed to get it working by changing the following in DefaultPlugin.php

$parameters = array( 'amount' => $payment->getTargetAmount(), 'description' => $data->has('description') ? $data->get('description') : 'Transaction ' . $payment->getId(), 'returnUrl' => $data->get('return_url'), 'paymentMethod' => $this->getMethod($transaction) );

To

$parameters = array( 'amount' => $payment->getTargetAmount(), 'description' => $data->has('description') ? $data->get('description') : 'Transaction ' . $payment->getId(), 'returnUrl' => $data->get('return_url'), 'paymentMethod' => $this->getMethod($transaction), 'notifyUrl' => $data->get('notify_url'), );

No i'm able to set the notify_url in the predefined_data for every payment method