r96685 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96684‎ | r96685 | r96686 >
Date:19:46, 9 September 2011
Author:kaldari
Status:ok (Comments)
Tags:fundraising 
Comment:
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 (modified) (history)
  • /branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter5.php (modified) (history)
  • /branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter6.php (modified) (history)
  • /branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter7.php (modified) (history)
  • /branches/fundraising/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetter3.php (modified) (history)
  • /branches/fundraising/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnPremiumUS.php (modified) (history)
  • /branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php (modified) (history)

Diff [purge]

Index: branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter5.php
@@ -136,11 +136,11 @@
137137 $form .= '<tr>';
138138 $form .= '<td class="label">' . wfMsg( 'payflowpro_gateway-payment-type' ) . '</td>';
139139 $form .= '<td>' .
140 - 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>' .
141 - 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>' .
142 - 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>' .
143 - 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>' .
144 - 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>' .
 140+ 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>' .
 141+ 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>' .
 142+ 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>' .
 143+ 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>' .
 144+ 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>' .
145145 '</td>';
146146 $form .= '</tr>';
147147
Index: branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter6.php
@@ -130,17 +130,17 @@
131131 $form .= '<tr>';
132132 $form .= '<td class="label">' . wfMsg( 'payflowpro_gateway-payment-type' ) . '</td>';
133133 $form .= '<td>' .
134 - 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>' .
135 - 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>' .
136 - 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>' .
137 - 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>' .
138 - 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>' .
 134+ 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>' .
 135+ 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>' .
 136+ 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>' .
 137+ 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>' .
 138+ 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>' .
139139 '</td>';
140140 $form .= '</tr>';
141141
142142 $form .= '</table>';
143143
144 - if ( $this->form_data['card'] == 'cc1' || $this->form_data['card'] == 'cc2' || $this->form_data['card'] == 'cc3' || $this->form_data['card'] == 'cc4' ) {
 144+ 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' ) {
145145 $form .= Xml::openElement( 'table', array( 'id' => 'payflow-table-cc' ) );
146146 } else {
147147 $form .= Xml::openElement( 'table', array( 'id' => 'payflow-table-cc', 'style' => 'display: none;' ) );
@@ -202,7 +202,7 @@
203203 public function generateFormSubmit() {
204204
205205 // cc submit button
206 - if ( $this->form_data['card'] == 'cc1' || $this->form_data['card'] == 'cc2' || $this->form_data['card'] == 'cc3' || $this->form_data['card'] == 'cc4' ) {
 206+ 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' ) {
207207 $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit' ) );
208208 } else {
209209 $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit', 'style' => 'display: none;' ) );
@@ -216,7 +216,7 @@
217217 $form .= Xml::closeElement( 'div' ); // close div#payflowpro_gateway-form-submit
218218
219219 // paypal submit button
220 - if ( $this->form_data['card'] == 'cc1' || $this->form_data['card'] == 'cc2' || $this->form_data['card'] == 'cc3' || $this->form_data['card'] == 'cc4' ) {
 220+ 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' ) {
221221 $form .= Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit-paypal', 'style' => 'display: none;' ) );
222222 } else {
223223 $form .= Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit-paypal' ) );
Index: branches/fundraising/extensions/DonationInterface/gateway_forms/TwoColumnLetter7.php
@@ -249,20 +249,20 @@
250250 $form .= '<td class="label""><div style="padding-top:9px;">' . wfMsg( 'payflowpro_gateway-payment-type' ) . '</div></td>';
251251 $form .= '<td>' .
252252 '<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;">'.
253 - 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>' .
 253+ 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>' .
254254 '&#160;<label for="cc1radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-mastercard.png" ) ). '</label>' .
255255 '&#160;<label for="cc1radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-amex.png" ) ). '</label>' .
256256 '&#160;<label for="cc1radio">' . Xml::element( 'img', array( 'src' => $wgScriptPath . "/extensions/DonationInterface/payflowpro_gateway/includes/card-discover.png" ) ). '</label>' .
257257 '</p>'.
258258 '<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;">'.
259 - 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>' .
 259+ 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>' .
260260 '</p>'.
261261 '</td>';
262262 $form .= '</tr>';
263263
264264 $form .= '</table>';
265265
266 - if ( $this->form_data['card'] == 'cc1' || $this->form_data['card'] == 'cc2' || $this->form_data['card'] == 'cc3' || $this->form_data['card'] == 'cc4' ) {
 266+ 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' ) {
267267 $form .= Xml::openElement( 'table', array( 'id' => 'payflow-table-cc' ) );
268268 } else {
269269 $form .= Xml::openElement( 'table', array( 'id' => 'payflow-table-cc', 'style' => 'display: none;' ) );
@@ -360,7 +360,7 @@
361361 global $wgScriptPath;
362362
363363 // cc submit button
364 - if ( $this->form_data['card'] == 'cc1' || $this->form_data['card'] == 'cc2' || $this->form_data['card'] == 'cc3' || $this->form_data['card'] == 'cc4' ) {
 364+ 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' ) {
365365 $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit' ) );
366366 } else {
367367 $form = Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit', 'style' => 'display: none;' ) );
@@ -374,7 +374,7 @@
375375 $form .= Xml::closeElement( 'div' ); // close div#payflowpro_gateway-form-submit
376376
377377 // paypal submit button
378 - if ( $this->form_data['card'] == 'cc1' || $this->form_data['card'] == 'cc2' || $this->form_data['card'] == 'cc3' || $this->form_data['card'] == 'cc4' ) {
 378+ 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' ) {
379379 $form .= Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit-paypal', 'style' => 'display: none;' ) );
380380 } else {
381381 $form .= Xml::openElement( 'div', array( 'id' => 'payflowpro_gateway-form-submit-paypal' ) );
Index: branches/fundraising/extensions/DonationInterface/gateway_forms/Form.php
@@ -190,7 +190,7 @@
191191 // generate a dropdown opt for each card
192192 foreach ( $available_cards as $value => $card_name ) {
193193 // only load the card value if we're in testing mode
194 - $selected = ( $value == $this->form_data[ 'card' ] && $this->test ) ? true : false;
 194+ $selected = ( $value == $this->form_data[ 'card_type' ] && $this->test ) ? true : false;
195195 $card_options .= Xml::option( $card_name, $value, $selected );
196196 }
197197
@@ -198,8 +198,8 @@
199199 $card_menu = Xml::openElement(
200200 'select',
201201 array(
202 - 'name' => 'card',
203 - 'id' => 'card'
 202+ 'name' => 'card_type',
 203+ 'id' => 'card_type'
204204 ) );
205205 $card_menu .= $card_options;
206206 $card_menu .= Xml::closeElement( 'select' );
@@ -476,9 +476,9 @@
477477 $form .= '<td colspan=2><span class="creditcard-error-msg">' . $this->form_errors['card_num'] . '</span></td>';
478478 $form .= '</tr>';
479479 }
480 - if ( $this->form_errors['card'] ) {
 480+ if ( $this->form_errors['card_type'] ) {
481481 $form .= '<tr>';
482 - $form .= '<td colspan=2><span class="creditcard-error-msg">' . $this->form_errors['card'] . '</span></td>';
 482+ $form .= '<td colspan=2><span class="creditcard-error-msg">' . $this->form_errors['card_type'] . '</span></td>';
483483 $form .= '</tr>';
484484 }
485485 $form .= '<tr>';
@@ -637,7 +637,7 @@
638638
639639 protected function getCreditCardTypeField() {
640640 $form = '<tr>';
641 - $form .= '<td class="label">' . Xml::label( wfMsg( 'payflowpro_gateway-donor-card' ), 'card' ) . '</td>';
 641+ $form .= '<td class="label">' . Xml::label( wfMsg( 'payflowpro_gateway-donor-card' ), 'card_type' ) . '</td>';
642642 $form .= '<td>' . $this->generateCardDropdown() . '</td>';
643643 $form .= '</tr>';
644644 return $form;
Index: branches/fundraising/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetter3.php
@@ -245,9 +245,9 @@
246246 $form .= '<td colspan=2><span class="creditcard-error-msg">' . $this->form_errors['card_num'] . '</span></td>';
247247 $form .= '</tr>';
248248 }
249 - if ( $this->form_errors['card'] ) {
 249+ if ( $this->form_errors['card_type'] ) {
250250 $form .= '<tr>';
251 - $form .= '<td colspan=2><span class="creditcard-error-msg">' . $this->form_errors['card'] . '</span></td>';
 251+ $form .= '<td colspan=2><span class="creditcard-error-msg">' . $this->form_errors['card_type'] . '</span></td>';
252252 $form .= '</tr>';
253253 }
254254 $form .= '<tr>';
Index: branches/fundraising/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnPremiumUS.php
@@ -223,9 +223,9 @@
224224 $form .= '<td colspan=2><span class="creditcard-error-msg">' . $this->form_errors['card_num'] . '</span></td>';
225225 $form .= '</tr>';
226226 }
227 - if ( $this->form_errors['card'] ) {
 227+ if ( $this->form_errors['card_type'] ) {
228228 $form .= '<tr>';
229 - $form .= '<td colspan=2><span class="creditcard-error-msg">' . $this->form_errors['card'] . '</span></td>';
 229+ $form .= '<td colspan=2><span class="creditcard-error-msg">' . $this->form_errors['card_type'] . '</span></td>';
230230 $form .= '</tr>';
231231 }
232232 $form .= '<tr>';
Index: branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php
@@ -62,22 +62,22 @@
6363 $wgPayFlowProGatewayCSSVersion );
6464
6565 $scriptVars = array(
66 - 'globalcollectGatewayErrorMsgJs' => wfMsg( 'globalcollect_gateway-error-msg-js' ),
67 - 'globalcollectGatewayErrorMsgEmail' => wfMsg( 'globalcollect_gateway-error-msg-email' ),
68 - 'globalcollectGatewayErrorMsgAmount' => wfMsg( 'globalcollect_gateway-error-msg-amount' ),
69 - 'globalcollectGatewayErrorMsgEmailAdd' => wfMsg( 'globalcollect_gateway-error-msg-emailAdd' ),
70 - 'globalcollectGatewayErrorMsgFname' => wfMsg( 'globalcollect_gateway-error-msg-fname' ),
71 - 'globalcollectGatewayErrorMsgLname' => wfMsg( 'globalcollect_gateway-error-msg-lname' ),
72 - 'globalcollectGatewayErrorMsgStreet' => wfMsg( 'globalcollect_gateway-error-msg-street' ),
73 - 'globalcollectGatewayErrorMsgCity' => wfMsg( 'globalcollect_gateway-error-msg-city' ),
74 - 'globalcollectGatewayErrorMsgState' => wfMsg( 'globalcollect_gateway-error-msg-state' ),
75 - 'globalcollectGatewayErrorMsgZip' => wfMsg( 'globalcollect_gateway-error-msg-zip' ),
76 - 'globalcollectGatewayErrorMsgCountry' => wfMsg( 'globalcollect_gateway-error-msg-country' ),
77 - 'globalcollectGatewayErrorMsgCardType' => wfMsg( 'globalcollect_gateway-error-msg-card_type' ),
78 - 'globalcollectGatewayErrorMsgCardNum' => wfMsg( 'globalcollect_gateway-error-msg-card_num' ),
79 - 'globalcollectGatewayErrorMsgExpiration' => wfMsg( 'globalcollect_gateway-error-msg-expiration' ),
80 - 'globalcollectGatewayErrorMsgCvv' => wfMsg( 'globalcollect_gateway-error-msg-cvv' ),
81 - 'globalcollectGatewayCVVExplain' => wfMsg( 'globalcollect_gateway-cvv-explain' ),
 66+ 'globalcollectGatewayErrorMsgJs' => wfMsg( 'payflowpro_gateway-error-msg-js' ),
 67+ 'globalcollectGatewayErrorMsgEmail' => wfMsg( 'payflowpro_gateway-error-msg-email' ),
 68+ 'globalcollectGatewayErrorMsgAmount' => wfMsg( 'payflowpro_gateway-error-msg-amount' ),
 69+ 'globalcollectGatewayErrorMsgEmailAdd' => wfMsg( 'payflowpro_gateway-error-msg-emailAdd' ),
 70+ 'globalcollectGatewayErrorMsgFname' => wfMsg( 'payflowpro_gateway-error-msg-fname' ),
 71+ 'globalcollectGatewayErrorMsgLname' => wfMsg( 'payflowpro_gateway-error-msg-lname' ),
 72+ 'globalcollectGatewayErrorMsgStreet' => wfMsg( 'payflowpro_gateway-error-msg-street' ),
 73+ 'globalcollectGatewayErrorMsgCity' => wfMsg( 'payflowpro_gateway-error-msg-city' ),
 74+ 'globalcollectGatewayErrorMsgState' => wfMsg( 'payflowpro_gateway-error-msg-state' ),
 75+ 'globalcollectGatewayErrorMsgZip' => wfMsg( 'payflowpro_gateway-error-msg-zip' ),
 76+ 'globalcollectGatewayErrorMsgCountry' => wfMsg( 'payflowpro_gateway-error-msg-country' ),
 77+ 'globalcollectGatewayErrorMsgCardType' => wfMsg( 'payflowpro_gateway-error-msg-card_type' ),
 78+ 'globalcollectGatewayErrorMsgCardNum' => wfMsg( 'payflowpro_gateway-error-msg-card_num' ),
 79+ 'globalcollectGatewayErrorMsgExpiration' => wfMsg( 'payflowpro_gateway-error-msg-expiration' ),
 80+ 'globalcollectGatewayErrorMsgCvv' => wfMsg( 'payflowpro_gateway-error-msg-cvv' ),
 81+ 'globalcollectGatewayCVVExplain' => wfMsg( 'payflowpro_gateway-cvv-explain' ),
8282 );
8383
8484 $wgOut->addScript( Skin::makeVariablesScript( $scriptVars ) );
@@ -182,7 +182,7 @@
183183 } else {
184184 if ( !$this->adapter->isCache() ) {
185185 // if we're not caching, there's a token mismatch
186 - $this->errors['general']['token-mismatch'] = wfMsg( 'globalcollect_gateway-token-mismatch' );
 186+ $this->errors['general']['token-mismatch'] = wfMsg( 'payflowpro_gateway-token-mismatch' );
187187 }
188188 $this->fnPayflowDisplayForm( $data, $this->errors );
189189 }
@@ -264,17 +264,17 @@
265265 // create the human-speak message for required fields
266266 // does not include fields that are not required
267267 $msg = array(
268 - 'amount' => wfMsg( 'globalcollect_gateway-error-msg-amount' ),
269 - 'emailAdd' => wfMsg( 'globalcollect_gateway-error-msg-emailAdd' ),
270 - 'fname' => wfMsg( 'globalcollect_gateway-error-msg-fname' ),
271 - 'lname' => wfMsg( 'globalcollect_gateway-error-msg-lname' ),
272 - 'street' => wfMsg( 'globalcollect_gateway-error-msg-street' ),
273 - 'city' => wfMsg( 'globalcollect_gateway-error-msg-city' ),
274 - 'state' => wfMsg( 'globalcollect_gateway-error-msg-state' ),
275 - 'zip' => wfMsg( 'globalcollect_gateway-error-msg-zip' ),
276 - 'card_num' => wfMsg( 'globalcollect_gateway-error-msg-card_num' ),
277 - 'expiration' => wfMsg( 'globalcollect_gateway-error-msg-expiration' ),
278 - 'cvv' => wfMsg( 'globalcollect_gateway-error-msg-cvv' ),
 268+ 'amount' => wfMsg( 'payflowpro_gateway-error-msg-amount' ),
 269+ 'emailAdd' => wfMsg( 'payflowpro_gateway-error-msg-emailAdd' ),
 270+ 'fname' => wfMsg( 'payflowpro_gateway-error-msg-fname' ),
 271+ 'lname' => wfMsg( 'payflowpro_gateway-error-msg-lname' ),
 272+ 'street' => wfMsg( 'payflowpro_gateway-error-msg-street' ),
 273+ 'city' => wfMsg( 'payflowpro_gateway-error-msg-city' ),
 274+ 'state' => wfMsg( 'payflowpro_gateway-error-msg-state' ),
 275+ 'zip' => wfMsg( 'payflowpro_gateway-error-msg-zip' ),
 276+ 'card_num' => wfMsg( 'payflowpro_gateway-error-msg-card_num' ),
 277+ 'expiration' => wfMsg( 'payflowpro_gateway-error-msg-expiration' ),
 278+ 'cvv' => wfMsg( 'payflowpro_gateway-error-msg-cvv' ),
279279 );
280280
281281 // find all empty fields and create message
@@ -282,7 +282,7 @@
283283 if ( $value == '' || ($key == 'state' && $value == 'YY' )) {
284284 // ignore fields that are not required
285285 if ( isset( $msg[$key] ) ) {
286 - $error[$key] = "**" . wfMsg( 'globalcollect_gateway-error-msg', $msg[$key] ) . "**<br />";
 286+ $error[$key] = "**" . wfMsg( 'payflowpro_gateway-error-msg', $msg[$key] ) . "**<br />";
287287 $error_result = '1';
288288 }
289289 }
@@ -292,7 +292,7 @@
293293 if ( !preg_match( '/^\d+(\.(\d+)?)?$/', $data[ 'amount' ] ) ||
294294 ( (float) $this->convert_to_usd( $data[ 'currency' ], $data[ 'amount' ] ) < (float) $wgPayflowProGatewayPriceFloor ||
295295 (float) $this->convert_to_usd( $data[ 'currency' ], $data[ 'amount' ] ) > (float) $wgPayflowProGatewayPriceCeiling ) ) {
296 - $error['invalidamount'] = wfMsg( 'globalcollect_gateway-error-msg-invalid-amount' );
 296+ $error['invalidamount'] = wfMsg( 'payflowpro_gateway-error-msg-invalid-amount' );
297297 $error_result = '1';
298298 }
299299
@@ -301,7 +301,7 @@
302302
303303 // create error message (supercedes empty field message)
304304 if ( !$isEmail ) {
305 - $error['emailAdd'] = wfMsg( 'globalcollect_gateway-error-msg-email' );
 305+ $error['emailAdd'] = wfMsg( 'payflowpro_gateway-error-msg-email' );
306306 $error_result = '1';
307307 }
308308
@@ -317,7 +317,7 @@
318318 } else { // an invalid credit card number was entered
319319 //TODO: Make sure this is uncommented when you commit for reals!
320320 //$error_result = '1';
321 - //$error[ 'card_num' ] = wfMsg( 'globalcollect_gateway-error-msg-card-num' );
 321+ //$error[ 'card_num' ] = wfMsg( 'payflowpro_gateway-error-msg-card-num' );
322322 }
323323
324324 return $error_result;

Comments

#Comment by Jpostlethwaite (talk | contribs)   19:15, 23 September 2011

Messaging will need to be consolidated so they can be shared across credit card gateways.

Status & tagging log