http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100712

Revision: 100712
Author:   khorn
Date:     2011-10-25 17:10:35 +0000 (Tue, 25 Oct 2011)
Log Message:
-----------
PFP now checks for the appropriate DI settings for the Thank You (and fail) 
pages. 

Modified Paths:
--------------
    
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php

Modified: 
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php
===================================================================
--- 
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php
   2011-10-25 17:00:16 UTC (rev 100711)
+++ 
trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php
   2011-10-25 17:10:35 UTC (rev 100712)
@@ -134,10 +134,12 @@
         * @param $responseMsg String: message supplied by getResults function
         */
        function fnPayflowDisplayApprovedResults( $data, $responseMsg ) {
-               global $wgOut, $wgExternalThankYouPage;
+               global $wgOut;
+               
+               $thankyoupage = $this->adapter->getGlobal( 'ThankYouPage' );
 
-               if ( $wgExternalThankYouPage ) {
-                       $wgOut->redirect( $wgExternalThankYouPage . "/" . 
$data['language'] );
+               if ( $thankyoupage ) {
+                       $wgOut->redirect( $thankyoupage . "/" . 
$data['language'] );
                } else {
                        // display response message
                        $wgOut->addHTML( '<h3 class="response_message">' . 
$responseMsg . '</h3>' );
@@ -165,12 +167,17 @@
         */
        function fnPayflowDisplayDeclinedResults( $responseMsg ) {
                global $wgOut;
+               $failpage = $this->adapter->getGlobal( 'FailPage' );
 
-               // general decline message
-               $declinedDefault = wfMsg( 'php-response-declined' );
+               if ( $failpage ) {
+                       $wgOut->redirect( $failpage . "/" . $data['language'] );
+               } else {
+                       // general decline message
+                       $declinedDefault = wfMsg( 'php-response-declined' );
 
-               // display response message
-               $wgOut->addHTML( '<h3 class="response_message">' . 
$declinedDefault . ' ' . $responseMsg . '</h3>' );
+                       // display response message
+                       $wgOut->addHTML( '<h3 class="response_message">' . 
$declinedDefault . ' ' . $responseMsg . '</h3>' );
+               }
        }
 
        /**


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to