Reputation: 885
Hi i'm implementing paypal with codeigniter. i'm using paypal integration wizard to generate the code: https://www.paypal-labs.com/integrationwizard/.
in the return url, i call a function named confirmorder() to handle successful payment. By paypal default, the payment will be handled in a lightbox/a new page. I want that after user make payment successfully, and lightbox closes, the partent page (the one under lightbox, also where user press 'pay by paypal') will direct to home page. but no matter how i change the code, the redirection always happen in the payment handle page, not the parent page.
anyone got some idea on this?
Thanks
Upvotes: 0
Views: 1321
Reputation: 1276
What I understand is that you are let user to make payment through a dialog box right? In this condition you should redirect the page using javascript by redirecting parent window using opener.location.href = '/redirecturl'; and after redirecting you should also close the dialog box using close(); method of javascript
Upvotes: 1