r100409 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100408‎ | r100409 | r100410 >
Date:04:23, 21 October 2011
Author:jpostlethwaite
Status:resolved (Comments)
Tags:fundraising 
Comment:
Getting rid of BANK_TRANSFER. Adding $transaction_groups and $transaction_types.
Modified paths:
  • /trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 /**
54 * Wikimedia Foundation
65 *
@@ -109,13 +108,18 @@
110109 protected $transactions;
111110
112111 /**
113 - * $transaction_type will be set in the GatewayForm::execute()
 112+ * $transaction_groups will be defined by the adapter.
114113 *
115 - * @var string|false
 114+ * @var array $transaction_groups
 115+ */
 116+ protected $transaction_groups = array();
 117+
 118+ /**
 119+ * $transaction_types will be defined by the adapter.
116120 *
117 - * @see GatewayForm::execute()
 121+ * @var array $transaction_types
118122 */
119 - protected $transaction_type = false;
 123+ protected $transaction_types = array();
120124
121125 /**
122126 * Staged variables. This is affected by the transaction type.
@@ -173,7 +177,6 @@
174178 //TODO: Fix this a bit.
175179
176180 $this->posted = $wgRequest->wasPosted();
177 -
178181 $this->setPostDefaults( $postDefaults );
179182 $this->defineTransactions();
180183 $this->defineVarMap();
@@ -182,7 +185,7 @@
183186
184187 //Don't bother setting the transaction type if it's not something.
185188 if ( $this->dataObj->isSomething( 'transaction_type' ) ) {
186 - $this->currentTransaction( $this->postdata['transaction_type'] );
 189+ $this->currentTransaction('INSERT_ORDERWITHPAYMENT');
187190 }
188191
189192 $this->displaydata = $this->postdata;

Follow-up revisions

RevisionCommit summaryAuthorDate
r100660Gateway-specific anything does not belong in the abstract parent class....khorn22:51, 24 October 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100408Documentation cleanup. Added public declarations to methods.jpostlethwaite04:19, 21 October 2011

Comments

#Comment by Khorn (WMF) (talk | contribs)   22:38, 24 October 2011

Referencing 'INSERT_ORDERWITHPAYMENT' in the parent adapter object works fine for GlobalCollect, but this breaks all the other gateways. Please keep gateway-specific code out of the abstract parent class.

#Comment by Jpostlethwaite (talk | contribs)   03:02, 27 October 2011

This has been removed.

Status & tagging log