r102140 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102139‎ | r102140 | r102141 >
Date:02:00, 6 November 2011
Author:khorn
Status:ok
Tags:
Comment:
Prevents anything that isn't a credit card transaction from abusing the GlobalCollect resultswitcher.
Modified paths:
  • /trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php
@@ -62,9 +62,10 @@
6363 if ( $this->adapter->checkTokens() ) {
6464 // Display form for the first time
6565 $oid = $wgRequest->getText( 'order_id' );
66 - $adapter_oid = $this->adapter->getData_Raw();
67 - $adapter_oid = $adapter_oid['order_id'];
68 - if ( $oid && !empty( $oid ) && $oid === $adapter_oid ) {
 66+ $adapter_oid = $this->adapter->getData_Raw( 'order_id' );
 67+
 68+ //this next block is for credit card coming back from GC. Only that. Nothing else, ever.
 69+ if ( $this->adapter->getData_Raw( 'payment_method') === 'cc' && $oid && !empty( $oid ) && $oid === $adapter_oid ) {
6970 if ( !array_key_exists( 'order_status', $_SESSION ) || !array_key_exists( $oid, $_SESSION['order_status'] ) ) {
7071 $_SESSION['order_status'][$oid] = $this->adapter->do_transaction( 'Confirm_CreditCard' );
7172 $_SESSION['order_status'][$oid]['data']['count'] = 0;

Follow-up revisions

RevisionCommit summaryAuthorDate
r102236MFT r90286, r100671, r100837, r100950, r101060, r101063, r101064, r101073, r1......khorn03:06, 7 November 2011
r102237MFT r90286, r100671, r100837, r100950, r101060, r101063, r101064, r101073, r1......khorn03:07, 7 November 2011

Status & tagging log