I have 2 versions of the same payment type I am writing plugins for and I need help understanding the difference in the architecture and how to handle the differences with custom actions.
Method 1 is an offsite payment that returns to the 'done' url, which in turn checks the status and redirects the user to a success/error page. (When the user returns, MY SYSTEM sends a query about the payment status)
Method 2 is again an offsite payment, however the user cannot be returned to the same 'done' page as this payment gateway sends an individual notification to a url that I set when creating the payment, that contains the payment result data. So presently I send my user to a pending page. However I cannot use the 'done' page to handle the separate notification as I need to set a different response (Just 'OK', nothing else) and the 'done' page wants to redirect as it it has been accessed by a user in the browser.
What is the best way to handle this? I have already written code to handle method 1 but need it to handle method 2 also.
Can I use custom actions to achieve this?
The docs aren't really that clear about how I can perform the seperate actions from the 'done' url?
Thanks in advance
J