r102186 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102185‎ | r102186 | r102187 >
Date:19:55, 6 November 2011
Author:khorn
Status:ok
Tags:
Comment:
Adds the original transaction response status to the set_payment response, just prior to the stomp message being constructed so we can see the original status in stomp.
r102081
Modified paths:
  • /trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php (modified) (history)
  • /trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro.adapter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro.adapter.php
@@ -235,7 +235,9 @@
236236 */
237237 function processResponse( $response ) {
238238 //set the transaction result message
239 - $this->setTransactionResult( $response['RESPMSG'], 'txn_message' );
 239+ if ( isset( $response['RESPMSG'] ) ){
 240+ $this->setTransactionResult( $response['RESPMSG'], 'txn_message' );
 241+ }
240242 if ( isset( $response['PNREF'] ) ){
241243 $this->setTransactionResult( $response['PNREF'], 'gateway_txn_id' );
242244 }
Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php
@@ -799,6 +799,8 @@
800800
801801 if ( !$cancelflag && !$problemflag ) {
802802 $order_status_results = $this->getTransactionWMFStatus();
 803+ $txn_data = $this->getTransactionData();
 804+ $original_status_code = isset( $txn_data['STATUSID']) ? $txn_data['STATUSID'] : 'NOT SET';
803805 if (!$order_status_results){
804806 $problemflag = true;
805807 $problemmessage = "We don't have a Transaction WMF Status after doing a GET_ORDERSTATUS.";
@@ -834,7 +836,9 @@
835837 if ( !$cancelflag ){
836838 $final = $this->do_transaction( 'SET_PAYMENT' );
837839 if ( isset( $final['status'] ) && $final['status'] === true ) {
838 - $this->setTransactionWMFStatus( $order_status_results ); //this had damn well better exist if we got this far.
 840+ $this->setTransactionWMFStatus( $order_status_results );
 841+ //get the old status from the first txn, and add in the part where we set the payment.
 842+ $this->setTransactionResult( "Original Response Status (pre-SET_PAYMENT): " . $original_status_code, 'txn_message' );
839843 $this->runPostProcessHooks(); //stomp is in here
840844 $this->unsetAllSessionData();
841845 } else {
@@ -844,7 +848,7 @@
845849 } else {
846850 $final = $this->do_transaction( 'CANCEL_PAYMENT' );
847851 if ( isset( $final['status'] ) && $final['status'] === true ) {
848 - $this->setTransactionWMFStatus( 'failed' );
 852+ $this->setTransactionWMFStatus( $order_status_results );
849853 $this->unsetAllSessionData();
850854 } else {
851855 $problemflag = true;
Index: trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php
@@ -832,7 +832,6 @@
833833 $pulled_data = $this->getResponseData( $formatted );
834834 $this->setTransactionResult( $pulled_data, 'data' );
835835
836 - //TODO: Death to the pulled_data parameter!
837836 $this->processResponse( $pulled_data ); //now we've set all the transaction results...
838837
839838 //well, almost all.

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

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102081Finishes up the first pass on the new scheme we need to use, for confirming a...khorn01:47, 5 November 2011

Status & tagging log