Index: trunk/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | |
40 | 40 | //Now, actually do the processing. |
41 | 41 | if ( method_exists( $this, $func ) ) { |
42 | | - $this->{$function_name}(); |
| 42 | + $this->{$func}(); |
43 | 43 | } else { |
44 | 44 | echo "There's no $func in Orphan Rectifying!\n"; |
45 | 45 | die(); |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/scripts/orphan_adapter.php |
— | — | @@ -100,7 +100,8 @@ |
101 | 101 | // return "NOPE"; |
102 | 102 | // break; |
103 | 103 | default: |
104 | | - return parent::do_transaction( $transaction ); |
| 104 | + $ret = parent::do_transaction( $transaction ); |
| 105 | + return $ret; |
105 | 106 | break; |
106 | 107 | } |
107 | 108 | } |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php |
— | — | @@ -1049,6 +1049,7 @@ |
1050 | 1050 | $this->getStopwatch( __FUNCTION__, true ); |
1051 | 1051 | $result = $this->transactionConfirm_CreditCard(); |
1052 | 1052 | $this->saveCommunicationStats( __FUNCTION__, $transaction ); |
| 1053 | + return $result; |
1053 | 1054 | break; |
1054 | 1055 | default: |
1055 | 1056 | return parent::do_transaction( $transaction ); |
— | — | @@ -1080,14 +1081,14 @@ |
1081 | 1082 | } else { //this is an orphan transaction. |
1082 | 1083 | $this->staged_data['order_id'] = $this->staged_data['i_order_id']; |
1083 | 1084 | $is_orphan = true; |
| 1085 | + //have to change this code range: All these are usually "pending" and |
| 1086 | + //that would still be true... |
| 1087 | + //...aside from the fact that if the user has gotten this far, they left |
| 1088 | + //the part where they could add more data. |
| 1089 | + //By now, "incomplete" definitely means "failed" for 0-70. |
| 1090 | + $this->addCodeRange( 'GET_ORDERSTATUS', 'STATUSID', 'failed', 0, 70 ); |
1084 | 1091 | } |
1085 | 1092 | |
1086 | | - //have to change this code range: All these are usually "pending" and |
1087 | | - //that would still be true... |
1088 | | - //...aside from the fact that if the user has gotten this far, they left |
1089 | | - //the part where they could add more data. |
1090 | | - //By now, "incomplete" definitely means "failed" for 0-70. |
1091 | | - $this->addCodeRange( 'GET_ORDERSTATUS', 'STATUSID', 'failed', 0, 70 ); |
1092 | 1093 | $status_result = $this->do_transaction( 'GET_ORDERSTATUS' ); |
1093 | 1094 | |
1094 | 1095 | $cancelflag = false; //this will denote the thing we're trying to do with the donation attempt |
— | — | @@ -1095,7 +1096,6 @@ |
1096 | 1097 | $problemmessage = ''; //to be used in conjunction with the flag. |
1097 | 1098 | $add_antimessage = false; //this tells us if we should add an antimessage when we are done or not. |
1098 | 1099 | |
1099 | | - |
1100 | 1100 | if ( $is_orphan ){ |
1101 | 1101 | if ( array_key_exists('data', $status_result) ) { |
1102 | 1102 | foreach ( $pull_vars as $theirkey => $ourkey) { |
— | — | @@ -1195,10 +1195,10 @@ |
1196 | 1196 | $problemflag = true; |
1197 | 1197 | $problemmessage = "CANCEL_PAYMENT couldn't communicate properly!"; |
1198 | 1198 | } |
| 1199 | + } else { |
| 1200 | + //in case we got wiped out, set the final status to what it was before. |
| 1201 | + $this->setTransactionWMFStatus( $order_status_results ); |
1199 | 1202 | } |
1200 | | - //No else. We can't be in here if we've had problems, so the |
1201 | | - //GET_STATUS must have told us no. No action required (in fact, |
1202 | | - //GC will complain if we try to can something at this point). |
1203 | 1203 | } |
1204 | 1204 | } |
1205 | 1205 | |
— | — | @@ -1214,7 +1214,7 @@ |
1215 | 1215 | $problemmessage = $this->getData_Raw( 'contribution_tracking_id' ) . ':' . $this->getData_Raw( 'order_id' ) . ' ' . $problemmessage; |
1216 | 1216 | self::log( $problemmessage ); |
1217 | 1217 | //hurm. It would be swell if we had a message that told the user we had some kind of internal error. |
1218 | | - return array( |
| 1218 | + $ret = array( |
1219 | 1219 | 'status' => false, |
1220 | 1220 | //TODO: appropriate messages. |
1221 | 1221 | 'message' => $problemmessage, |
— | — | @@ -1223,6 +1223,7 @@ |
1224 | 1224 | ), |
1225 | 1225 | 'action' => $this->getValidationAction(), |
1226 | 1226 | ); |
| 1227 | + return $ret; |
1227 | 1228 | } |
1228 | 1229 | |
1229 | 1230 | // return something better... if we need to! |
Index: trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php |
— | — | @@ -1529,6 +1529,11 @@ |
1530 | 1530 | if ( !$this->getGlobal( 'EnableStomp' ) ){ |
1531 | 1531 | return; |
1532 | 1532 | } |
| 1533 | + global $wgLimboStompQueueName; |
| 1534 | + if ( !isset( $wgLimboStompQueueName ) || $wgLimboStompQueueName === false ){ |
| 1535 | + return; |
| 1536 | + } |
| 1537 | + |
1533 | 1538 | $this->debugarray[] = "Attempting Limbo Stomp Transaction!"; |
1534 | 1539 | $hook = 'gwLimboStomp'; |
1535 | 1540 | |
Index: trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php |
— | — | @@ -130,7 +130,7 @@ |
131 | 131 | function sendLimboSTOMP( $transaction ) { |
132 | 132 | global $wgStompServer, $wgLimboStompQueueName; |
133 | 133 | |
134 | | - $queueName = isset( $wgLimboStompQueueName ) ? $wgLimboStompQueueName : 'test'; |
| 134 | + $queueName = isset( $wgLimboStompQueueName ) ? $wgLimboStompQueueName : 'limbo'; |
135 | 135 | |
136 | 136 | // include a library |
137 | 137 | require_once( "Stomp.php" ); |