r102467 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102466‎ | r102467 | r102468 >
Date:23:52, 8 November 2011
Author:jpostlethwaite
Status:ok
Tags:fundraising 
Comment:
Enabling credit cards in TwoStepAmount form.
Modified paths:
  • /trunk/extensions/DonationInterface/globalcollect_gateway/forms/TwoStepAmount.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/TwoStepAmount.php
@@ -307,6 +307,24 @@
308308 }
309309
310310 /**
 311+ * Generate the credit card component
 312+ *
 313+ * Nothing is being added right now.
 314+ *
 315+ * @param array $options
 316+ *
 317+ * @return string Returns an HTML string
 318+ */
 319+ protected function getCreditCard( $options = array() ) {
 320+
 321+ extract( $options );
 322+
 323+ $return = '';
 324+
 325+ return $return;
 326+ }
 327+
 328+ /**
311329 * Generate the direct debit component
312330 *
313331 * @param array $options
@@ -594,7 +612,7 @@
595613
596614 $headerOptions['id'] = $id . '_header';
597615
598 - $return .= $this->getFormSectionHeaderTag( wfMsg( 'donate_interface-currency' ), $headerOptions );
 616+ $return .= $this->getFormSectionHeaderTag( wfMsg( 'donate_interface-payment_method-' . $this->getPaymentMethod() ), $headerOptions );
599617
600618 $return .= Xml::openElement( 'div', array( 'id' => $id ) ); // $id
601619
@@ -701,12 +719,24 @@
702720
703721 $return .= Xml::openElement( 'table', array( 'id' => $id . '_table' ) );
704722
705 - $return .= $this->getDirectDebit();
 723+ switch ( $this->getPaymentMethod() ) {
 724+ case 'bt':
 725+ $return .= $this->getBankTransfer();
 726+ break;
 727+ case 'cc':
 728+ $return .= $this->getCreditCard();
 729+ break;
 730+ case 'dd':
 731+ $return .= $this->getDirectDebit();
 732+ break;
 733+ case 'rtbt':
 734+ $return .= $this->getRealTimeBankTransfer();
 735+ break;
 736+ default:
 737+ $return .= $this->getCreditCard();
 738+ break;
 739+ }
706740
707 - $return .= $this->getBankTransfer();
708 -
709 - $return .= $this->getRealTimeBankTransfer();
710 -
711741 $return .= Xml::closeElement( 'table' ); // close $id . '_table'
712742
713743 $return .= Xml::closeElement( 'div' ); // $id

Follow-up revisions

RevisionCommit summaryAuthorDate
r102732MFT r100644, r100785, r101785, r102120, r102318, r102332, r102341, r102342, r...awjrichards01:31, 11 November 2011

Status & tagging log