PrestaShopCorp / dotpay

Dotpay payment module
1 stars 13 forks source link

Controller for urlc.php #3

Closed Quetzacoalt91 closed 9 years ago

Quetzacoalt91 commented 9 years ago

Setting a controller for urlc.php as you did for payment.php would be a good idea.

I know that you do not want to display the whole page, only a simple message. So I guess the function displayAjax() instead of initContent() could do the properly job for you (even if it is not the perfect function name for this case).

If you do this, you would be able to use the PS function in your script.

pkarecki commented 9 years ago

I have moved part responsible for callback (before it was urlc.php) to payment.php controller displayAjax() but I have initContent() started before displayAjax() which finally redirects dotpay callback to some content. Now I use initContent() { if (!Tools::getValue("ajax")) {. Better way is to create separate controller or workaround this way?

Quetzacoalt91 commented 9 years ago

Hi @pkarecki,

When I opened this issue, I was expecting a new controller. The two options are valid, but I guess we should have two files as before if they don't have the same role.

Quetzacoalt91 commented 9 years ago

With the new controller callback, we can close this issue.