r102576 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102575‎ | r102576 | r102577 >
Date:21:34, 9 November 2011
Author:jpostlethwaite
Status:ok
Tags:fundraising 
Comment:
Implemented error handling for internal errors.
Modified paths:
  • /trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php
@@ -113,11 +113,16 @@
114114 } elseif ( ( $errorCode == '5' ) ) {
115115 $this->log( $msgPrefix . "Transaction pending.", LOG_DEBUG );
116116 $this->fnPayflowDisplayPending( $data, $responseMsg );
117 - } elseif ( ( $errorCode == '1000000' ) ) { //TODO: This is temporary until we can decide on the actual error codes WE control.
 117+ } elseif ( strpos( $errorCode, 'internal' ) === 0 ) {
118118 $this->log( $msgPrefix . "Transaction unsuccessful (communication failure).", LOG_DEBUG );
119 - $this->fnPayflowDisplayOtherResults( $responseMsg );
120119 $this->errors['retryMsg'] = $responseMsg;
121120 $this->displayForm( $this->errors );
 121+ } elseif ( !empty( $errorCode ) ) {
 122+ // This should not be hit.
 123+ $this->log( $msgPrefix . "Transaction unsuccessful (unknown failure).", LOG_DEBUG );
 124+ $this->fnPayflowDisplayOtherResults( $responseMsg );
 125+ $this->errors['retryMsg'] = $errorCode;
 126+ $this->displayForm( $this->errors );
122127 }
123128 }
124129

Follow-up revisions

RevisionCommit summaryAuthorDate
r102842MFT r102576, r102577, r102579, r102581, r102804, r102805, r102812, r102819, r...awjrichards02:20, 12 November 2011
r102929Re-attempting MFT r102576, r102577, r102578, r102579, r102581, r102689, r1027...khorn00:50, 14 November 2011

Status & tagging log