Difference between revisions of "How to redirect user to different thanks page after payment"

From aMember Pro Documentation
Jump to: navigation, search
(Created page with "Create /amember/application/configs/site.php with this code: <source> <?php Am_Di::getInstance()->hook->add(am_Event::THANKS_PAGE, 'onThanksPage'); function onTha...")
 
Line 2: Line 2:
 
<source>
 
<source>
 
<?php
 
<?php
         Am_Di::getInstance()->hook->add(am_Event::THANKS_PAGE, 'onThanksPage');
+
         Am_Di::getInstance()->hook->add(Am_Event::THANKS_PAGE, 'onThanksPage');
 
         function onThanksPage(Am_Event $event){
 
         function onThanksPage(Am_Event $event){
 
             $di = Am_Di::getInstance();
 
             $di = Am_Di::getInstance();

Revision as of 06:09, 31 January 2013

Create /amember/application/configs/site.php with this code:

<?php
        Am_Di::getInstance()->hook->add(Am_Event::THANKS_PAGE, 'onThanksPage');
        function onThanksPage(Am_Event $event){
            $di = Am_Di::getInstance();
            Am_Controller::redirectLocation('/url/where/user/should/be/redirected');
        }
?>