Page 1 of 1

ID parameter for webhook

Posted: Wed Mar 19, 2014 11:43 am
by Ertenal
I am writing a module to use the Mollie API (dutch iDeal).

One part of this API is that you can specify an url for a webhook. After a payment Mollie sends a POST request to that url with a variable called 'id'. With this ID you can get the payment status and update your local database.

But the annoying part is, cmsms does not support this 'id' variable. I specified a route in my module but it only shows the layout, not the action contents for this route when i use the 'id' parameter. It works when i remove the 'id' parameter.

This happens with a $_GET['id'] or a $_POST['id'].

Any solutions??

Re: ID parameter for webhook

Posted: Wed Mar 19, 2014 7:16 pm
by calguy1000
You're right. CMSMS uses the id param internally (it's removed in 2.0)

The only viable solution I know of is to use mod_rewrite to rename the variable on incoming requests.

Re: ID parameter for webhook

Posted: Thu Mar 20, 2014 9:04 am
by Ertenal
That's a good solution! The only problem is that i have to create something outside the module code. I'm not to happy about that.

If you say it is removed in 2.0 i will wait for that version to release this module.

Re: ID parameter for webhook

Posted: Thu Mar 20, 2014 6:00 pm
by Rolf
You can download the trunk version of cmsms in the SVN. That is 2.0 and test your module!