Problem with redirecting after payment from bank system

Hello,

I’m writing module for payment throw BankLink system. Problem is, that after paymen in bank when user submits form which redirects back to shop (redirection url: cl=order&fnc=itoltorderpb&sid=1&sid=’.$this->getSession()->getId()) oxid only shows index page and takes default cl=start. It seems that if there is POST data, oxid does not pays attention to $_GET data. How to solve this into oxid?

Problem solved. What i did, i’ve created handler in the root directory for redirection from bank system. It takes all data from POST, validates it and drops to GET, then redirects user back to the shop. That worked like a charm.

Also i got response in mailing list about POST and GET priority in oxid. I’m droping the answer here too.

Hello Darius,

you’re right: If you use $this->getConfig()->getParameter() then indeed the POST-data do have priority. You cann see the logic in function getParameter() in the core-class oxconfig:

First the global $_POST-array is checked, then the $_GET-array and then even the $_SESSION-array is checked for a fitting parameter (which is deprecated but unfortunately still there).

So in this case to be sure to read the $_GET parameters you will have to read them directly from the $_GET-array not using the getParameter() method. Be sure to validate those directly taken parameteres for preventing any injection of evvil stuff.

Greetings!
Andreas Ziethen
CEO of anzido GmbH

Hi,

thanks for the feedback!