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

Revision: 96685
Author:   kaldari
Date:     2011-09-09 19:46:00 +0000 (Fri, 09 Sep 2011)
Log Message:
-----------
temp fixing some error messages (new messages dont exist yet), completing 
migration from confusing card error to card_type error

Modified Paths:
--------------
    branches/fundraising/extensions/DonationInterface/gateway_forms/Form.php
    
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter5.php
    
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter6.php
    
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter7.php
    
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetter3.php
    
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnPremiumUS.php
    
branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php

Modified: 
branches/fundraising/extensions/DonationInterface/gateway_forms/Form.php
===================================================================
--- branches/fundraising/extensions/DonationInterface/gateway_forms/Form.php    
2011-09-09 19:05:53 UTC (rev 96684)
+++ branches/fundraising/extensions/DonationInterface/gateway_forms/Form.php    
2011-09-09 19:46:00 UTC (rev 96685)
@@ -190,7 +190,7 @@
                // generate  a dropdown opt for each card
                foreach ( $available_cards as $value => $card_name ) {
                        // only load the card value if we're in testing mode
-                       $selected = ( $value == $this->form_data[ 'card' ] && 
$this->test ) ? true : false;
+                       $selected = ( $value == $this->form_data[ 'card_type' ] 
&& $this->test ) ? true : false;
                        $card_options .= Xml::option( $card_name, $value, 
$selected );
                }
 
@@ -198,8 +198,8 @@
                $card_menu = Xml::openElement(
                        'select',
                        array(
-                               'name' => 'card',
-                               'id' => 'card'
+                               'name' => 'card_type',
+                               'id' => 'card_type'
                        ) );
                $card_menu .= $card_options;
                $card_menu .= Xml::closeElement( 'select' );
@@ -476,9 +476,9 @@
                        $form .= '<td colspan=2><span 
class="creditcard-error-msg">' . $this->form_errors['card_num'] . 
'</span></td>';
                        $form .= '</tr>';
                }
-               if ( $this->form_errors['card'] ) {
+               if ( $this->form_errors['card_type'] ) {
                        $form .= '<tr>';
-                       $form .= '<td colspan=2><span 
class="creditcard-error-msg">' . $this->form_errors['card'] . '</span></td>';
+                       $form .= '<td colspan=2><span 
class="creditcard-error-msg">' . $this->form_errors['card_type'] . 
'</span></td>';
                        $form .= '</tr>';
                }
                $form .= '<tr>';
@@ -637,7 +637,7 @@
 
        protected function getCreditCardTypeField() {
                $form = '<tr>';
-               $form .= '<td class="label">' . Xml::label( wfMsg( 
'payflowpro_gateway-donor-card' ), 'card' ) . '</td>';
+               $form .= '<td class="label">' . Xml::label( wfMsg( 
'payflowpro_gateway-donor-card' ), 'card_type' ) . '</td>';
                $form .= '<td>' . $this->generateCardDropdown() . '</td>';
                $form .= '</tr>';
                return $form;

Modified: 
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter5.php
===================================================================
--- 
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter5.php
        2011-09-09 19:05:53 UTC (rev 96684)
+++ 
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter5.php
        2011-09-09 19:46:00 UTC (rev 96685)
@@ -136,11 +136,11 @@
                $form .= '<tr>';
                $form .= '<td class="label">' . wfMsg( 
'payflowpro_gateway-payment-type' ) . '</td>';
                $form .= '<td>' . 
-                       Xml::radio( 'card', 'cc1', $this->form_data['card'] == 
'cc1', array( 'id' => 'cc1radio', 'onclick' => 'switchToCreditCard()' ) ) . 
'<label for="cc1radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-visa.png" ) ). 
'</label>' .
-                       Xml::radio( 'card', 'cc2', $this->form_data['card'] == 
'cc2', array( 'id' => 'cc2radio', 'onclick' => 'switchToCreditCard()' ) ) . 
'<label for="cc2radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-mastercard.png" 
) ). '</label>' .
-                       Xml::radio( 'card', 'cc3',  $this->form_data['card'] == 
'cc3', array( 'id' => 'cc3radio', 'onclick' => 'switchToCreditCard()' ) ) . 
'<label for="cc3radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-amex.png" ) ). 
'</label>' .
-                       Xml::radio( 'card', 'cc4', $this->form_data['card'] == 
'cc4', array( 'id' => 'cc4radio', 'onclick' => 'switchToCreditCard()' ) ) . 
'<label for="cc4radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-discover.png" ) 
). '</label>' . 
-                       Xml::radio( 'card', 'pp', $this->form_data['card'] == 
'pp', array( 'id' => 'ppradio', 'onclick' => 'switchToPayPal()' ) ) . '<label 
for="ppradio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-paypal.png" ) ) 
. '</label>' .
+                       Xml::radio( 'card_type', 'cc1', 
$this->form_data['card_type'] == 'cc1', array( 'id' => 'cc1radio', 'onclick' => 
'switchToCreditCard()' ) ) . '<label for="cc1radio">' . Xml::element( 'img', 
array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-visa.png" ) ). 
'</label>' .
+                       Xml::radio( 'card_type', 'cc2', 
$this->form_data['card_type'] == 'cc2', array( 'id' => 'cc2radio', 'onclick' => 
'switchToCreditCard()' ) ) . '<label for="cc2radio">' . Xml::element( 'img', 
array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-mastercard.png" 
) ). '</label>' .
+                       Xml::radio( 'card_type', 'cc3',  
$this->form_data['card_type'] == 'cc3', array( 'id' => 'cc3radio', 'onclick' => 
'switchToCreditCard()' ) ) . '<label for="cc3radio">' . Xml::element( 'img', 
array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-amex.png" ) ). 
'</label>' .
+                       Xml::radio( 'card_type', 'cc4', 
$this->form_data['card_type'] == 'cc4', array( 'id' => 'cc4radio', 'onclick' => 
'switchToCreditCard()' ) ) . '<label for="cc4radio">' . Xml::element( 'img', 
array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-discover.png" ) 
). '</label>' . 
+                       Xml::radio( 'card_type', 'pp', 
$this->form_data['card_type'] == 'pp', array( 'id' => 'ppradio', 'onclick' => 
'switchToPayPal()' ) ) . '<label for="ppradio">' . Xml::element( 'img', array( 
'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-paypal.png" ) ) 
. '</label>' .
                        '</td>';
                $form .= '</tr>';
                

Modified: 
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter6.php
===================================================================
--- 
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter6.php
        2011-09-09 19:05:53 UTC (rev 96684)
+++ 
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter6.php
        2011-09-09 19:46:00 UTC (rev 96685)
@@ -130,17 +130,17 @@
                $form .= '<tr>';
                $form .= '<td class="label">' . wfMsg( 
'payflowpro_gateway-payment-type' ) . '</td>';
                $form .= '<td>' . 
-                       Xml::radio( 'card', 'cc1', $this->form_data['card'] == 
'cc1', array( 'id' => 'cc1radio', 'onclick' => 'switchToCreditCard()' ) ) . 
'<label for="cc1radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-visa.png" ) ). 
'</label>' .
-                       Xml::radio( 'card', 'cc2', $this->form_data['card'] == 
'cc2', array( 'id' => 'cc2radio', 'onclick' => 'switchToCreditCard()' ) ) . 
'<label for="cc2radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-mastercard.png" 
) ). '</label>' .
-                       Xml::radio( 'card', 'cc3',  $this->form_data['card'] == 
'cc3', array( 'id' => 'cc3radio', 'onclick' => 'switchToCreditCard()' ) ) . 
'<label for="cc3radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-amex.png" ) ). 
'</label>' .
-                       Xml::radio( 'card', 'cc4', $this->form_data['card'] == 
'cc4', array( 'id' => 'cc4radio', 'onclick' => 'switchToCreditCard()' ) ) . 
'<label for="cc4radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-discover.png" ) 
). '</label>' . 
-                       Xml::radio( 'card', 'pp', $this->form_data['card'] == 
'pp', array( 'id' => 'ppradio', 'onclick' => 'switchToPayPal()' ) ) . '<label 
for="ppradio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-paypal.png" ) ) 
. '</label>' .
+                       Xml::radio( 'card_type', 'cc1', 
$this->form_data['card_type'] == 'cc1', array( 'id' => 'cc1radio', 'onclick' => 
'switchToCreditCard()' ) ) . '<label for="cc1radio">' . Xml::element( 'img', 
array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-visa.png" ) ). 
'</label>' .
+                       Xml::radio( 'card_type', 'cc2', 
$this->form_data['card_type'] == 'cc2', array( 'id' => 'cc2radio', 'onclick' => 
'switchToCreditCard()' ) ) . '<label for="cc2radio">' . Xml::element( 'img', 
array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-mastercard.png" 
) ). '</label>' .
+                       Xml::radio( 'card_type', 'cc3',  
$this->form_data['card_type'] == 'cc3', array( 'id' => 'cc3radio', 'onclick' => 
'switchToCreditCard()' ) ) . '<label for="cc3radio">' . Xml::element( 'img', 
array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-amex.png" ) ). 
'</label>' .
+                       Xml::radio( 'card_type', 'cc4', 
$this->form_data['card_type'] == 'cc4', array( 'id' => 'cc4radio', 'onclick' => 
'switchToCreditCard()' ) ) . '<label for="cc4radio">' . Xml::element( 'img', 
array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-discover.png" ) 
). '</label>' . 
+                       Xml::radio( 'card_type', 'pp', 
$this->form_data['card_type'] == 'pp', array( 'id' => 'ppradio', 'onclick' => 
'switchToPayPal()' ) ) . '<label for="ppradio">' . Xml::element( 'img', array( 
'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-paypal.png" ) ) 
. '</label>' .
                        '</td>';
                $form .= '</tr>';
                
                $form .= '</table>';
                
-               if ( $this->form_data['card'] == 'cc1' || 
$this->form_data['card'] == 'cc2' || $this->form_data['card'] == 'cc3' || 
$this->form_data['card'] == 'cc4' ) {
+               if ( $this->form_data['card_type'] == 'cc1' || 
$this->form_data['card_type'] == 'cc2' || $this->form_data['card_type'] == 
'cc3' || $this->form_data['card_type'] == 'cc4' ) {
                        $form .= Xml::openElement( 'table', array( 'id' => 
'payflow-table-cc' ) );
                } else {
                        $form .= Xml::openElement( 'table', array( 'id' => 
'payflow-table-cc', 'style' => 'display: none;' ) );
@@ -202,7 +202,7 @@
        public function generateFormSubmit() {
        
                // cc submit button
-               if ( $this->form_data['card'] == 'cc1' || 
$this->form_data['card'] == 'cc2' || $this->form_data['card'] == 'cc3' || 
$this->form_data['card'] == 'cc4' ) {
+               if ( $this->form_data['card_type'] == 'cc1' || 
$this->form_data['card_type'] == 'cc2' || $this->form_data['card_type'] == 
'cc3' || $this->form_data['card_type'] == 'cc4' ) {
                        $form = Xml::openElement( 'div', array( 'id' => 
'payflowpro_gateway-form-submit' ) );
                } else {
                        $form = Xml::openElement( 'div', array( 'id' => 
'payflowpro_gateway-form-submit', 'style' => 'display: none;' ) );
@@ -216,7 +216,7 @@
                $form .= Xml::closeElement( 'div' ); // close 
div#payflowpro_gateway-form-submit
                
                // paypal submit button
-               if ( $this->form_data['card'] == 'cc1' || 
$this->form_data['card'] == 'cc2' || $this->form_data['card'] == 'cc3' || 
$this->form_data['card'] == 'cc4' ) {
+               if ( $this->form_data['card_type'] == 'cc1' || 
$this->form_data['card_type'] == 'cc2' || $this->form_data['card_type'] == 
'cc3' || $this->form_data['card_type'] == 'cc4' ) {
                        $form .= Xml::openElement( 'div', array( 'id' => 
'payflowpro_gateway-form-submit-paypal', 'style' => 'display: none;' ) );
                } else {
                        $form .= Xml::openElement( 'div', array( 'id' => 
'payflowpro_gateway-form-submit-paypal' ) );

Modified: 
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter7.php
===================================================================
--- 
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter7.php
        2011-09-09 19:05:53 UTC (rev 96684)
+++ 
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter7.php
        2011-09-09 19:46:00 UTC (rev 96685)
@@ -249,20 +249,20 @@
                $form .= '<td class="label""><div style="padding-top:9px;">' . 
wfMsg( 'payflowpro_gateway-payment-type' ) . '</div></td>';
                $form .= '<td>' . 
                        '<p style="border: 1px solid rgb(187, 187, 187); float: 
left; -moz-border-radius: 5px 5px 5px 5px; margin: 0 8px 0 0; padding: 5px 5px 
5px 3px; white-space: nowrap;">'.
-                       Xml::radio( 'card', 'cc1', $this->form_data['card'] == 
'cc1', array( 'id' => 'cc1radio', 'onclick' => 'switchToCreditCard()' ) ) . 
'<label for="cc1radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-visa.png" ) ). 
'</label>' .
+                       Xml::radio( 'card_type', 'cc1', 
$this->form_data['card_type'] == 'cc1', array( 'id' => 'cc1radio', 'onclick' => 
'switchToCreditCard()' ) ) . '<label for="cc1radio">' . Xml::element( 'img', 
array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-visa.png" ) ). 
'</label>' .
                        '&#160;<label for="cc1radio">' . Xml::element( 'img', 
array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-mastercard.png" 
) ). '</label>' .
                        '&#160;<label for="cc1radio">' . Xml::element( 'img', 
array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-amex.png" ) ). 
'</label>' .
                        '&#160;<label for="cc1radio">' . Xml::element( 'img', 
array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-discover.png" ) 
). '</label>' . 
                        '</p>'.
                        '<p style="border: 1px solid transparent; float: left; 
-moz-border-radius: 5px 5px 5px 5px; margin: 0; padding: 5px 5px 5px 3px; 
white-space: nowrap;">'.
-                       Xml::radio( 'card', 'pp', $this->form_data['card'] == 
'pp', array( 'id' => 'ppradio', 'onclick' => 'switchToPayPal()' ) ) . '<label 
for="ppradio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-paypal.png" ) ) 
. '</label>' .
+                       Xml::radio( 'card_type', 'pp', 
$this->form_data['card_type'] == 'pp', array( 'id' => 'ppradio', 'onclick' => 
'switchToPayPal()' ) ) . '<label for="ppradio">' . Xml::element( 'img', array( 
'src' => $wgScriptPath . 
"/extensions/DonationInterface/payflowpro_gateway/includes/card-paypal.png" ) ) 
. '</label>' .
                        '</p>'.
                        '</td>';
                $form .= '</tr>';
                
                $form .= '</table>';
                
-               if ( $this->form_data['card'] == 'cc1' || 
$this->form_data['card'] == 'cc2' || $this->form_data['card'] == 'cc3' || 
$this->form_data['card'] == 'cc4' ) {
+               if ( $this->form_data['card_type'] == 'cc1' || 
$this->form_data['card_type'] == 'cc2' || $this->form_data['card_type'] == 
'cc3' || $this->form_data['card_type'] == 'cc4' ) {
                        $form .= Xml::openElement( 'table', array( 'id' => 
'payflow-table-cc' ) );
                } else {
                        $form .= Xml::openElement( 'table', array( 'id' => 
'payflow-table-cc', 'style' => 'display: none;' ) );
@@ -360,7 +360,7 @@
                global $wgScriptPath;
        
                // cc submit button
-               if ( $this->form_data['card'] == 'cc1' || 
$this->form_data['card'] == 'cc2' || $this->form_data['card'] == 'cc3' || 
$this->form_data['card'] == 'cc4' ) {
+               if ( $this->form_data['card_type'] == 'cc1' || 
$this->form_data['card_type'] == 'cc2' || $this->form_data['card_type'] == 
'cc3' || $this->form_data['card_type'] == 'cc4' ) {
                        $form = Xml::openElement( 'div', array( 'id' => 
'payflowpro_gateway-form-submit' ) );
                } else {
                        $form = Xml::openElement( 'div', array( 'id' => 
'payflowpro_gateway-form-submit', 'style' => 'display: none;' ) );
@@ -374,7 +374,7 @@
                $form .= Xml::closeElement( 'div' ); // close 
div#payflowpro_gateway-form-submit
                
                // paypal submit button
-               if ( $this->form_data['card'] == 'cc1' || 
$this->form_data['card'] == 'cc2' || $this->form_data['card'] == 'cc3' || 
$this->form_data['card'] == 'cc4' ) {
+               if ( $this->form_data['card_type'] == 'cc1' || 
$this->form_data['card_type'] == 'cc2' || $this->form_data['card_type'] == 
'cc3' || $this->form_data['card_type'] == 'cc4' ) {
                        $form .= Xml::openElement( 'div', array( 'id' => 
'payflowpro_gateway-form-submit-paypal', 'style' => 'display: none;' ) );
                } else {
                        $form .= Xml::openElement( 'div', array( 'id' => 
'payflowpro_gateway-form-submit-paypal' ) );

Modified: 
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetter3.php
===================================================================
--- 
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetter3.php
 2011-09-09 19:05:53 UTC (rev 96684)
+++ 
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetter3.php
 2011-09-09 19:46:00 UTC (rev 96685)
@@ -245,9 +245,9 @@
                        $form .= '<td colspan=2><span 
class="creditcard-error-msg">' . $this->form_errors['card_num'] . 
'</span></td>';
                        $form .= '</tr>';
                }
-               if ( $this->form_errors['card'] ) {
+               if ( $this->form_errors['card_type'] ) {
                        $form .= '<tr>';
-                       $form .= '<td colspan=2><span 
class="creditcard-error-msg">' . $this->form_errors['card'] . '</span></td>';
+                       $form .= '<td colspan=2><span 
class="creditcard-error-msg">' . $this->form_errors['card_type'] . 
'</span></td>';
                        $form .= '</tr>';
                }
                $form .= '<tr>';

Modified: 
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnPremiumUS.php
===================================================================
--- 
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnPremiumUS.php
       2011-09-09 19:05:53 UTC (rev 96684)
+++ 
branches/fundraising/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnPremiumUS.php
       2011-09-09 19:46:00 UTC (rev 96685)
@@ -223,9 +223,9 @@
                        $form .= '<td colspan=2><span 
class="creditcard-error-msg">' . $this->form_errors['card_num'] . 
'</span></td>';
                        $form .= '</tr>';
                }
-               if ( $this->form_errors['card'] ) {
+               if ( $this->form_errors['card_type'] ) {
                        $form .= '<tr>';
-                       $form .= '<td colspan=2><span 
class="creditcard-error-msg">' . $this->form_errors['card'] . '</span></td>';
+                       $form .= '<td colspan=2><span 
class="creditcard-error-msg">' . $this->form_errors['card_type'] . 
'</span></td>';
                        $form .= '</tr>';
                }
                $form .= '<tr>';

Modified: 
branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php
===================================================================
--- 
branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php
      2011-09-09 19:05:53 UTC (rev 96684)
+++ 
branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php
      2011-09-09 19:46:00 UTC (rev 96685)
@@ -62,22 +62,22 @@
                        $wgPayFlowProGatewayCSSVersion );
 
                $scriptVars = array(
-                       'globalcollectGatewayErrorMsgJs' => wfMsg( 
'globalcollect_gateway-error-msg-js' ),
-                       'globalcollectGatewayErrorMsgEmail' => wfMsg( 
'globalcollect_gateway-error-msg-email' ),
-                       'globalcollectGatewayErrorMsgAmount' => wfMsg( 
'globalcollect_gateway-error-msg-amount' ),
-                       'globalcollectGatewayErrorMsgEmailAdd' => wfMsg( 
'globalcollect_gateway-error-msg-emailAdd' ),
-                       'globalcollectGatewayErrorMsgFname' => wfMsg( 
'globalcollect_gateway-error-msg-fname' ),
-                       'globalcollectGatewayErrorMsgLname' => wfMsg( 
'globalcollect_gateway-error-msg-lname' ),
-                       'globalcollectGatewayErrorMsgStreet' => wfMsg( 
'globalcollect_gateway-error-msg-street' ),
-                       'globalcollectGatewayErrorMsgCity' => wfMsg( 
'globalcollect_gateway-error-msg-city' ),
-                       'globalcollectGatewayErrorMsgState' => wfMsg( 
'globalcollect_gateway-error-msg-state' ),
-                       'globalcollectGatewayErrorMsgZip' => wfMsg( 
'globalcollect_gateway-error-msg-zip' ),
-                       'globalcollectGatewayErrorMsgCountry' => wfMsg( 
'globalcollect_gateway-error-msg-country' ),
-                       'globalcollectGatewayErrorMsgCardType' => wfMsg( 
'globalcollect_gateway-error-msg-card_type' ),
-                       'globalcollectGatewayErrorMsgCardNum' => wfMsg( 
'globalcollect_gateway-error-msg-card_num' ),
-                       'globalcollectGatewayErrorMsgExpiration' => wfMsg( 
'globalcollect_gateway-error-msg-expiration' ),
-                       'globalcollectGatewayErrorMsgCvv' => wfMsg( 
'globalcollect_gateway-error-msg-cvv' ),
-                       'globalcollectGatewayCVVExplain' => wfMsg( 
'globalcollect_gateway-cvv-explain' ),
+                       'globalcollectGatewayErrorMsgJs' => wfMsg( 
'payflowpro_gateway-error-msg-js' ),
+                       'globalcollectGatewayErrorMsgEmail' => wfMsg( 
'payflowpro_gateway-error-msg-email' ),
+                       'globalcollectGatewayErrorMsgAmount' => wfMsg( 
'payflowpro_gateway-error-msg-amount' ),
+                       'globalcollectGatewayErrorMsgEmailAdd' => wfMsg( 
'payflowpro_gateway-error-msg-emailAdd' ),
+                       'globalcollectGatewayErrorMsgFname' => wfMsg( 
'payflowpro_gateway-error-msg-fname' ),
+                       'globalcollectGatewayErrorMsgLname' => wfMsg( 
'payflowpro_gateway-error-msg-lname' ),
+                       'globalcollectGatewayErrorMsgStreet' => wfMsg( 
'payflowpro_gateway-error-msg-street' ),
+                       'globalcollectGatewayErrorMsgCity' => wfMsg( 
'payflowpro_gateway-error-msg-city' ),
+                       'globalcollectGatewayErrorMsgState' => wfMsg( 
'payflowpro_gateway-error-msg-state' ),
+                       'globalcollectGatewayErrorMsgZip' => wfMsg( 
'payflowpro_gateway-error-msg-zip' ),
+                       'globalcollectGatewayErrorMsgCountry' => wfMsg( 
'payflowpro_gateway-error-msg-country' ),
+                       'globalcollectGatewayErrorMsgCardType' => wfMsg( 
'payflowpro_gateway-error-msg-card_type' ),
+                       'globalcollectGatewayErrorMsgCardNum' => wfMsg( 
'payflowpro_gateway-error-msg-card_num' ),
+                       'globalcollectGatewayErrorMsgExpiration' => wfMsg( 
'payflowpro_gateway-error-msg-expiration' ),
+                       'globalcollectGatewayErrorMsgCvv' => wfMsg( 
'payflowpro_gateway-error-msg-cvv' ),
+                       'globalcollectGatewayCVVExplain' => wfMsg( 
'payflowpro_gateway-cvv-explain' ),
                );
 
                $wgOut->addScript( Skin::makeVariablesScript( $scriptVars ) );
@@ -182,7 +182,7 @@
                } else {
                        if ( !$this->adapter->isCache() ) {
                                // if we're not caching, there's a token 
mismatch
-                               $this->errors['general']['token-mismatch'] = 
wfMsg( 'globalcollect_gateway-token-mismatch' );
+                               $this->errors['general']['token-mismatch'] = 
wfMsg( 'payflowpro_gateway-token-mismatch' );
                        }
                        $this->fnPayflowDisplayForm( $data, $this->errors );
                }
@@ -264,17 +264,17 @@
                // create the human-speak message for required fields
                // does not include fields that are not required
                $msg = array(
-                       'amount' => wfMsg( 
'globalcollect_gateway-error-msg-amount' ),
-                       'emailAdd' => wfMsg( 
'globalcollect_gateway-error-msg-emailAdd' ),
-                       'fname' => wfMsg( 
'globalcollect_gateway-error-msg-fname' ),
-                       'lname' => wfMsg( 
'globalcollect_gateway-error-msg-lname' ),
-                       'street' => wfMsg( 
'globalcollect_gateway-error-msg-street' ),
-                       'city' => wfMsg( 'globalcollect_gateway-error-msg-city' 
),
-                       'state' => wfMsg( 
'globalcollect_gateway-error-msg-state' ),
-                       'zip' => wfMsg( 'globalcollect_gateway-error-msg-zip' ),
-                       'card_num' => wfMsg( 
'globalcollect_gateway-error-msg-card_num' ),
-                       'expiration' => wfMsg( 
'globalcollect_gateway-error-msg-expiration' ),
-                       'cvv' => wfMsg( 'globalcollect_gateway-error-msg-cvv' ),
+                       'amount' => wfMsg( 
'payflowpro_gateway-error-msg-amount' ),
+                       'emailAdd' => wfMsg( 
'payflowpro_gateway-error-msg-emailAdd' ),
+                       'fname' => wfMsg( 'payflowpro_gateway-error-msg-fname' 
),
+                       'lname' => wfMsg( 'payflowpro_gateway-error-msg-lname' 
),
+                       'street' => wfMsg( 
'payflowpro_gateway-error-msg-street' ),
+                       'city' => wfMsg( 'payflowpro_gateway-error-msg-city' ),
+                       'state' => wfMsg( 'payflowpro_gateway-error-msg-state' 
),
+                       'zip' => wfMsg( 'payflowpro_gateway-error-msg-zip' ),
+                       'card_num' => wfMsg( 
'payflowpro_gateway-error-msg-card_num' ),
+                       'expiration' => wfMsg( 
'payflowpro_gateway-error-msg-expiration' ),
+                       'cvv' => wfMsg( 'payflowpro_gateway-error-msg-cvv' ),
                );
 
                // find all empty fields and create message
@@ -282,7 +282,7 @@
                        if ( $value == '' || ($key == 'state' && $value == 'YY' 
)) {
                                // ignore fields that are not required
                                if ( isset( $msg[$key] ) ) {
-                                       $error[$key] = "**" . wfMsg( 
'globalcollect_gateway-error-msg', $msg[$key] ) . "**<br />";
+                                       $error[$key] = "**" . wfMsg( 
'payflowpro_gateway-error-msg', $msg[$key] ) . "**<br />";
                                        $error_result = '1';
                                }
                        }
@@ -292,7 +292,7 @@
                if ( !preg_match( '/^\d+(\.(\d+)?)?$/', $data[ 'amount' ] ) || 
                        ( (float) $this->convert_to_usd( $data[ 'currency' ], 
$data[ 'amount' ] ) < (float) $wgPayflowProGatewayPriceFloor || 
                                (float) $this->convert_to_usd( $data[ 
'currency' ], $data[ 'amount' ] ) > (float) $wgPayflowProGatewayPriceCeiling ) 
) {
-                       $error['invalidamount'] = wfMsg( 
'globalcollect_gateway-error-msg-invalid-amount' );
+                       $error['invalidamount'] = wfMsg( 
'payflowpro_gateway-error-msg-invalid-amount' );
                        $error_result = '1';
                }
 
@@ -301,7 +301,7 @@
 
                // create error message (supercedes empty field message)
                if ( !$isEmail ) {
-                       $error['emailAdd'] = wfMsg( 
'globalcollect_gateway-error-msg-email' );
+                       $error['emailAdd'] = wfMsg( 
'payflowpro_gateway-error-msg-email' );
                        $error_result = '1';
                }
 
@@ -317,7 +317,7 @@
                } else { // an invalid credit card number was entered
                //TODO: Make sure this is uncommented when you commit for 
reals! 
                        //$error_result = '1';
-                       //$error[ 'card_num' ] = wfMsg( 
'globalcollect_gateway-error-msg-card-num' );
+                       //$error[ 'card_num' ] = wfMsg( 
'payflowpro_gateway-error-msg-card-num' );
                }
                
                return $error_result;


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

Reply via email to