Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/TwoStepAmount.php |
— | — | @@ -307,6 +307,24 @@ |
308 | 308 | } |
309 | 309 | |
310 | 310 | /** |
| 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 | + /** |
311 | 329 | * Generate the direct debit component |
312 | 330 | * |
313 | 331 | * @param array $options |
— | — | @@ -594,7 +612,7 @@ |
595 | 613 | |
596 | 614 | $headerOptions['id'] = $id . '_header'; |
597 | 615 | |
598 | | - $return .= $this->getFormSectionHeaderTag( wfMsg( 'donate_interface-currency' ), $headerOptions ); |
| 616 | + $return .= $this->getFormSectionHeaderTag( wfMsg( 'donate_interface-payment_method-' . $this->getPaymentMethod() ), $headerOptions ); |
599 | 617 | |
600 | 618 | $return .= Xml::openElement( 'div', array( 'id' => $id ) ); // $id |
601 | 619 | |
— | — | @@ -701,12 +719,24 @@ |
702 | 720 | |
703 | 721 | $return .= Xml::openElement( 'table', array( 'id' => $id . '_table' ) ); |
704 | 722 | |
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 | + } |
706 | 740 | |
707 | | - $return .= $this->getBankTransfer(); |
708 | | - |
709 | | - $return .= $this->getRealTimeBankTransfer(); |
710 | | - |
711 | 741 | $return .= Xml::closeElement( 'table' ); // close $id . '_table' |
712 | 742 | |
713 | 743 | $return .= Xml::closeElement( 'div' ); // $id |