r102810 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102809‎ | r102810 | r102811 >
Date:19:58, 11 November 2011
Author:jpostlethwaite
Status:ok
Tags:fundraising 
Comment:
Fixed wrong index on data_constraints. Changed method to camel case for coding standards.
Modified paths:
  • /trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php
@@ -1710,12 +1710,12 @@
17111711 }
17121712
17131713 /**
1714 - * Stage: setup_stage_payment_method_for_direct_debit
 1714+ * Stage: setupStagePaymentMethodForDirectDebit
17151715 *
17161716 * @param string $payment_submethod
17171717 * @param string $type request|response
17181718 */
1719 - protected function setup_stage_payment_method_for_direct_debit( $payment_submethod, $type = 'request' ) {
 1719+ protected function setupStagePaymentMethodForDirectDebit( $payment_submethod, $type = 'request' ) {
17201720
17211721 // DATECOLLECT is required on all Direct Debit
17221722 $this->addKeyToTransaction('DATECOLLECT');
@@ -1724,10 +1724,11 @@
17251725 $this->staged_data['direct_debit_text'] = 'Wikimedia Foundation';
17261726
17271727 $this->staged_data['payment_product'] = $this->payment_submethods[ $payment_submethod ]['paymentproductid'];
1728 - $this->data_constraints['IBAN']['length'] = 21;
17291728 $this->var_map['PAYMENTPRODUCTID'] = 'payment_product';
17301729 $this->var_map['COUNTRYCODEBANK'] = 'country';
17311730
 1731+ $this->data_constraints['iban']['length'] = 21;
 1732+
17321733 // Direct debit has different required fields for each paymentproductid.
17331734 $this->addKeysToTransactionForSubmethod( $payment_submethod );
17341735 }
@@ -1760,47 +1761,47 @@
17611762
17621763 /* Direct Debit */
17631764 case 'dd_nl':
1764 - $this->data_constraints['DIRECTDEBITTEXT']['length'] = 32;
 1765+ $this->data_constraints['direct_debit_text']['length'] = 32;
17651766
1766 - $this->setup_stage_payment_method_for_direct_debit( $payment_submethod, $type);
 1767+ $this->setupStagePaymentMethodForDirectDebit( $payment_submethod, $type);
17671768 break;
17681769 case 'dd_gb':
17691770 $this->staged_data['transaction_type'] = '01';
17701771
1771 - $this->setup_stage_payment_method_for_direct_debit( $payment_submethod, $type);
 1772+ $this->setupStagePaymentMethodForDirectDebit( $payment_submethod, $type);
17721773 break;
17731774 case 'dd_at':
1774 - $this->data_constraints['DIRECTDEBITTEXT']['length'] = 28;
 1775+ $this->data_constraints['direct_debit_text']['length'] = 28;
17751776
1776 - $this->setup_stage_payment_method_for_direct_debit( $payment_submethod, $type);
 1777+ $this->setupStagePaymentMethodForDirectDebit( $payment_submethod, $type);
17771778 break;
17781779 case 'dd_be':
17791780
1780 - $this->setup_stage_payment_method_for_direct_debit( $payment_submethod, $type);
 1781+ $this->setupStagePaymentMethodForDirectDebit( $payment_submethod, $type);
17811782 break;
17821783 case 'dd_ch':
17831784
1784 - $this->setup_stage_payment_method_for_direct_debit( $payment_submethod, $type);
 1785+ $this->setupStagePaymentMethodForDirectDebit( $payment_submethod, $type);
17851786 break;
17861787 case 'dd_de':
17871788
1788 - $this->setup_stage_payment_method_for_direct_debit( $payment_submethod, $type);
 1789+ $this->setupStagePaymentMethodForDirectDebit( $payment_submethod, $type);
17891790 break;
17901791 case 'dd_es':
1791 - $this->data_constraints['DIRECTDEBITTEXT']['length'] = 40;
 1792+ $this->data_constraints['direct_debit_text']['length'] = 40;
17921793
1793 - $this->setup_stage_payment_method_for_direct_debit( $payment_submethod, $type);
 1794+ $this->setupStagePaymentMethodForDirectDebit( $payment_submethod, $type);
17941795 break;
17951796 case 'dd_fr':
1796 - $this->data_constraints['DIRECTDEBITTEXT']['length'] = 18;
 1797+ $this->data_constraints['direct_debit_text']['length'] = 18;
17971798
1798 - $this->setup_stage_payment_method_for_direct_debit( $payment_submethod, $type);
 1799+ $this->setupStagePaymentMethodForDirectDebit( $payment_submethod, $type);
17991800 break;
18001801 case 'dd_it':
1801 - $this->data_constraints['BANKCHECKDIGIT']['length'] = 1;
1802 - $this->data_constraints['DIRECTDEBITTEXT']['length'] = 32;
 1802+ $this->data_constraints['bank_check_digit']['length'] = 1;
 1803+ $this->data_constraints['direct_debit_text']['length'] = 32;
18031804
1804 - $this->setup_stage_payment_method_for_direct_debit( $payment_submethod, $type);
 1805+ $this->setupStagePaymentMethodForDirectDebit( $payment_submethod, $type);
18051806 break;
18061807
18071808 /* Online bank transfer */

Follow-up revisions

RevisionCommit summaryAuthorDate
r103847MFT r102338, r102681, r102685, r102810, r102828, r102829, r102832, r102836, r...khorn22:30, 21 November 2011
r103848MFT r102338, r102681, r102685, r102810, r102828, r102829, r102832, r102836, r...khorn22:31, 21 November 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102809Checking in $this->data_constraints. Fixed spelling error for AUTHORISATIONID...jpostlethwaite19:24, 11 November 2011

Status & tagging log