yaniv14 Posted August 17, 2015 Share Posted August 17, 2015 Hi, I am working on a payment module that the vendor is returning the result with post to one url and redirecting (get) to another url. How can I achieve it in PS? I have a controller that handle all the validation from the post data, the validaeOrder and the redirect to order-confirmation. I need to know how to split it so the client will end up in the order-confirmation page after the new order has been validated. Thanks. Link to comment Share on other sites More sharing options...
bellini13 Posted August 17, 2015 Share Posted August 17, 2015 I am working on a payment module that the vendor is returning the result with post to one url and redirecting (get) to another url. I assume you can give them 2 different URLs? Link to comment Share on other sites More sharing options...
yaniv14 Posted August 17, 2015 Author Share Posted August 17, 2015 Hi Bellini, I've tried that but for some reason when I do that I don't get my order validated and saved in the system. Do I need to do anything different in module controllers to get cart from context? Link to comment Share on other sites More sharing options...
bellini13 Posted August 17, 2015 Share Posted August 17, 2015 yes, if you are getting a notification from their server, it will not have the customers cookie or context, so you would need the gateway to send you the cart id so that you can reconstruct the context before calling validateOrder Link to comment Share on other sites More sharing options...
yaniv14 Posted August 17, 2015 Author Share Posted August 17, 2015 Do i need to override initcontent() in the controller? And if so do I need to run the validation from the init or once I load it I can do the rest from postprocess? Also is it enough to return the parent init? Link to comment Share on other sites More sharing options...
bellini13 Posted August 17, 2015 Share Posted August 17, 2015 I would suggest you review the Paypal modules ipn.php and you can get an idea of what is required. What you are trying to do is very similar to how Paypal works Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now