r106671 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106670‎ | r106671 | r106672 >
Date:19:01, 19 December 2011
Author:jamesur
Status:deferred
Tags:fundraising 
Comment:
Add boleto payment option back in
Modified paths:
  • /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
@@ -625,6 +626,13 @@
626627 'label' => 'Real time bank transfer',
627628 'types' => array( 'rtbt_ideal', 'rtbt_eps', 'rtbt_sofortuberweisung', 'rtbt_nordea_sweden', 'rtbt_enets', ),
628629 );
 630+
 631+ // Cash payments
 632+ $this->payment_meathods['cash'] = array(
 633+ 'label' => 'Cash payments',
 634+ 'types' => array( 'cash_boleto', ),
 635+ );
 636+
629637 }
630638
631639 /**
@@ -749,6 +757,7 @@
750758 'keys' => array(),
751759 );
752760
 761+
753762 /*
754763 * Direct debit
755764 *
@@ -964,6 +973,16 @@
965974 831 => 'Sparda-Bank',
966975 )
967976 );
 977+
 978+ // Cash Payments - Boletos
 979+
 980+ $this->payment_submethods['cash_boleto'] = array(
 981+ 'paymentproductid' => 1503,
 982+ 'label' => 'Boleto Bancario Brazil',
 983+ 'group' => 'cash',
 984+ 'validation' => array(),
 985+ 'keys' => array(),
 986+ );
968987 }
969988
970989 /**
@@ -1949,6 +1968,14 @@
19501969 $this->setupStagePaymentMethodForEWallets( $payment_submethod, $type);
19511970 break;
19521971
 1972+ /* Cash payments */
 1973+ case 'cash_boleto':
 1974+ $this->staged_data['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid'];
 1975+ $this->var_map['PAYMENTPRODUCTID'] = 'payment_product';
 1976+
 1977+ $this->addKeyToTransaction('FISCALNUMBER');
 1978+ break;
 1979+
19531980 /* Online bank transfer */
19541981 case 'bpay':
19551982 $this->staged_data['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid'];

Status & tagging log