Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php |
— | — | @@ -142,7 +142,7 @@ |
143 | 143 | $token_match = $this->fnPayflowMatchEditToken( $token_check, $wgPayflowGatewaySalt ); |
144 | 144 | if ( $wgRequest->wasPosted() ) { |
145 | 145 | self::log( $payflow_data[ 'order_id' ] . " " . $payflow_data[ 'i_order_id' ] . " Submitted edit token: " . $wgRequest->getText( 'token', 'None' ), 'payflowpro_gateway', LOG_DEBUG); |
146 | | - self::log( $payflow_data[ 'order_id' ] . " " . $payflow_data[ 'i_order_id' ] . " Token match: " . $token_match, 'payflowpro_gateway', LOG_DEBUG ); |
| 146 | + self::log( $payflow_data[ 'order_id' ] . " " . $payflow_data[ 'i_order_id' ] . " Token match: " . ($token_match ? 'true' : 'false' ), 'payflowpro_gateway', LOG_DEBUG ); |
147 | 147 | } |
148 | 148 | } |
149 | 149 | |
— | — | @@ -505,19 +505,24 @@ |
506 | 506 | |
507 | 507 | // if approved, display results and send transaction to the queue |
508 | 508 | if ( $errorCode == '1' ) { |
| 509 | + self::log( $data[ 'order_id' ] . " " . $data[ 'i_order_id' ] . " Transaction approved.", 'payflowpro_gateway', LOG_DEBUG ); |
509 | 510 | $this->fnPayflowDisplayApprovedResults( $data, $responseArray, $responseMsg ); |
510 | 511 | // give user a second chance to enter incorrect data |
511 | 512 | } elseif ( ( $errorCode == '3' ) && ( $data['numAttempt'] < '5' ) ) { |
| 513 | + self::log( $data[ 'order_id' ] . " " . $data[ 'i_order_id' ] . " Transaction unsuccessful (invalid info).", 'payflowpro_gateway', LOG_DEBUG ); |
512 | 514 | // pass responseMsg as an array key as required by displayForm |
513 | | - $this->errors['retryMsg'] = $responseMsg; |
514 | | - $this->fnPayflowDisplayForm( $data, $this->errors ); |
| 515 | + $this->errors['retryMsg'] = $responseMsg; |
| 516 | + $this->fnPayflowDisplayForm( $data, $this->errors ); |
515 | 517 | // if declined or if user has already made two attempts, decline |
516 | 518 | } elseif ( ( $errorCode == '2' ) || ( $data['numAttempt'] >= '3' ) ) { |
517 | | - $this->fnPayflowDisplayDeclinedResults( $responseMsg ); |
| 519 | + self::log( $data[ 'order_id' ] . " " . $data[ 'i_order_id' ] . " Transaction declined.", 'payflowpro_gateway', LOG_DEBUG ); |
| 520 | + $this->fnPayflowDisplayDeclinedResults( $responseMsg ); |
518 | 521 | } elseif ( ( $errorCode == '4' ) ) { |
519 | | - $this->fnPayflowDisplayOtherResults( $responseMsg ); |
| 522 | + self::log( $data[ 'order_id' ] . " " . $data[ 'i_order_id' ] . " Transaction unsuccessful.", 'payflowpro_gateway', LOG_DEBUG ); |
| 523 | + $this->fnPayflowDisplayOtherResults( $responseMsg ); |
520 | 524 | } elseif ( ( $errorCode == '5' ) ) { |
521 | | - $this->fnPayflowDisplayPending( $data, $responseArray, $responseMsg ); |
| 525 | + self::log( $data[ 'order_id' ] . " " . $data[ 'i_order_id' ] . " Transaction pending.", 'payflowpro_gateway', LOG_DEBUG ); |
| 526 | + $this->fnPayflowDisplayPending( $data, $responseArray, $responseMsg ); |
522 | 527 | } |
523 | 528 | |
524 | 529 | }// end display results |