r105408 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105407‎ | r105408 | r105409 >
Date:02:06, 7 December 2011
Author:jamesur
Status:reverted (Comments)
Tags:
Comment:
Add Boletos and adjust wording for country specific bank transfer information
Modified paths:
  • /trunk/extensions/DonationInterface/gateway_common/interface.i18n.php (modified) (history)
  • /trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php (modified) (history)
  • /trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php
@@ -160,8 +160,19 @@
161161 return $wgOut->redirect( $formAction );
162162 }
163163
164 - } else {
 164+ } elseif ( $payment_method == 'cash' ) {
 165+
165166 $this->adapter->do_transaction( 'INSERT_ORDERWITHPAYMENT' );
 167+
 168+ $formAction = $this->adapter->getTransactionDataFormAction();
 169+
 170+ // Redirect to the bank
 171+ if ( !empty( $formAction ) ) {
 172+ return $wgOut->redirect( $formAction );
 173+ }
 174+
 175+ } else {
 176+ $this->adapter->do_transaction( 'INSERT_ORDERWITHPAYMENT' );
166177 }
167178
168179 return $this->resultHandler();
Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php
@@ -314,6 +314,7 @@
315315 'SWIFTCODE' => 'swift_code',
316316 'TRANSACTIONTYPE' => 'transaction_type', // dd:GB,NL
317317 'ZIP' => 'zip',
 318+ 'FISCALNUMBER' => 'fiscal_number', //Boletos
318319 );
319320 }
320321
@@ -566,7 +567,7 @@
567568 'ORDERID',
568569 'EFFORTID',
569570 'PAYMENTPRODUCTID',
570 - ),
 571+ ),bt
571572 )
572573 )
573574 ),
@@ -629,6 +630,13 @@
630631 'label' => 'Real time bank transfer',
631632 'types' => array( 'rtbt_ideal', 'rtbt_eps', 'rtbt_sofortuberweisung', 'rtbt_nordea_sweden', 'rtbt_enets', ),
632633 );
 634+
 635+ // Cash payments
 636+ $this->payment_meathods['cash'] = array(
 637+ 'label' => 'Cash payments',
 638+ 'types' => array( 'cash_boleto', ),
 639+ );
 640+
633641 }
634642
635643 /**
@@ -753,6 +761,7 @@
754762 'keys' => array(),
755763 );
756764
 765+
757766 /*
758767 * Direct debit
759768 *
@@ -968,6 +977,16 @@
969978 831 => 'Sparda-Bank',
970979 )
971980 );
 981+
 982+ // Cash Payments - Boletos
 983+
 984+ $this->payment_submeathods['cash_boleto'] = array(
 985+ 'paymentproductid' => 1503,
 986+ 'label' => 'Boleto Bancario Brazil',
 987+ 'group' => 'cash',
 988+ 'validation' => array(),
 989+ 'keys' => array(),
 990+ );
972991 }
973992
974993 /**
@@ -1942,6 +1961,14 @@
19431962 $this->setupStagePaymentMethodForEWallets( $payment_submethod, $type);
19441963 break;
19451964
 1965+ /* Cash payments */
 1966+ case 'cash_boleto':
 1967+ $this->staged_data['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid'];
 1968+ $this->var_map['PAYMENTPRODUCTID'] = 'payment_product';
 1969+
 1970+ $this->addKeyToTransaction('FISCALNUMBER');
 1971+ break;
 1972+
19461973 /* Online bank transfer */
19471974 case 'bpay':
19481975 $this->staged_data['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid'];
Index: trunk/extensions/DonationInterface/gateway_common/interface.i18n.php
@@ -342,7 +342,7 @@
343343 'donate_interface-bt-country_description' => 'Country description',
344344 'donate_interface-bt-payment_reference' => 'Payment reference',
345345 'donate_interface-bt-swift_code' => 'Swift code',
346 - 'donate_interface-bt-special_id' => 'Special ID',
 346+ 'donate_interface-bt-special_id' => 'Country specific information',
347347 'donate_interface-bt-information' => 'Bank transfer information',
348348 'donate_interface-bt-finished' => 'Finished',
349349
@@ -412,6 +412,7 @@
413413
414414 // HTTP errors
415415 'donate_interface-error-http-403' => 'You do not have permission to access this page.',
 416+
416417 );
417418
418419 /** Message documentation (Message documentation)
@@ -755,7 +756,7 @@
756757 'donate_interface-bt-country_description' => 'Bank transfer: Country description',
757758 'donate_interface-bt-payment_reference' => 'Bank transfer: Payment reference',
758759 'donate_interface-bt-swift_code' => 'Bank transfer: Swift code',
759 - 'donate_interface-bt-special_id' => 'Bank transfer: Special ID',
 760+ 'donate_interface-bt-special_id' => 'Bank transfer: Label for country specific bank transfer information (for example ABA number for the USA)',
760761 'donate_interface-bt-information' => 'Bank transfer: Bank transfer information',
761762 'donate_interface-bt-finished' => 'Bank transfer: Finished - this is a link or a button to take the user to the Thank you page for their donation.',
762763 'donate_interface-obt-biller_id' => 'BPAY (Australian Online Bank Transfer) - The label for biller code',

Follow-up revisions

RevisionCommit summaryAuthorDate
r106083Self revert of r105408. Splitting up into 2 commits for merge sanity and make...jamesur20:36, 13 December 2011
r106086Re-add i18n changes orginally from r105408 for better bank transfer clarityjamesur20:43, 13 December 2011

Comments

#Comment by Jalexander-WMF (talk | contribs)   19:57, 13 December 2011

marking fixme, need to correct misspelling

#Comment by Jalexander-WMF (talk | contribs)   20:03, 13 December 2011

Actually, reverting this commit for now. Separating out i18n changes for merge now and adapter changes (and fixes) for later.

Status & tagging log