r97120 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97119‎ | r97120 | r97121 >
Date:23:53, 14 September 2011
Author:khorn
Status:deferred (Comments)
Tags:fundraising 
Comment:
Edits to the stageData function to honor defaults
Modified paths:
  • /branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php (modified) (history)

Diff [purge]

Index: branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php
@@ -13,7 +13,13 @@
1414 function stageData() {
1515 $this->postdata['amount'] = $this->postdata['amount'] * 100;
1616
17 - switch ( $this->postdata['card_type'] ) {
 17+ $card_type = '';
 18+ if (array_key_exists('card_type', $this->postdata)){
 19+ $card_type = $this->postdata['card_type'];
 20+ } else {
 21+ $card_type = $this->postdatadefaults['card_type'];
 22+ }
 23+ switch ( $card_type ) {
1824 case 'visa':
1925 $this->postdata['card_type'] = 1;
2026 break;

Comments

#Comment by Khorn (WMF) (talk | contribs)   18:41, 23 September 2011

Please note that this branch is in the middle of a serious refactoring, and is by no means ready to be merged back into trunk. (Latest DonationInterface branch rev at the time of this comment is r97833.)

#Comment by Khorn (WMF) (talk | contribs)   23:50, 7 October 2011

This has all been replaced by a newer and way more awesome, and reversable (!) stageData() function in the common gateway.adapter.php.

#Comment by Awjrichards (talk | contribs)   20:46, 21 October 2011

Marking as deferred since functionality was replaced in the future

#Comment by Platonides (talk | contribs)   20:51, 21 October 2011

'Was replaced in the future'... Did you use a time machine? :)

#Comment by Awjrichards (talk | contribs)   20:55, 21 October 2011

Hahaha i was wondering if anyone would pick up on the tense-mismatch. I borrowed the TARDIS.

Status & tagging log