i need to write a module for a custom method of payment.
It’s a cc gateway:
- the user get redirected to the payment site where he fills in his data.
- the payment site connects to a page on my site sending (GET) infos about the status of the transaction.
- the payment site redirects the user to a page on my site passing (via GET) the same informations as above.
So the response page gets called twice, one time from the payment site, and one time from the customer’s browser.
I have written two php functions:
- the first one gets the required data about the transaction and redirects the user to payment site,
- the second one gets the response received back from the cc/gateway and extracts relevant data (actually this only shows this data back to the user).
Can someone help me in writing this module?
I have some doubts regarding the response page..
how can i define the response page needed on magento?
how to handle the dobule call (one from user and one from payment site) to that page?
Basically i need to get data about the order from magento, and call a function.
Then on response, get the status and update magento order status accordingly.
I’m new on magento development, and i would be appreciate if someone could point me in the right direction.
(I’ve found a tutorial about writing payment modules but it seems outdated and does not cover the points I said.)