Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | |
8 | 8 | $IP = getenv( 'MW_INSTALL_PATH' ); |
9 | 9 | if ( $IP === false ) { |
10 | | - $IP = dirname( _FILE_ ) . '/../..'; |
| 10 | + $IP = dirname( _FILE_ ) . '/../../../..'; |
11 | 11 | } |
12 | 12 | |
13 | 13 | //If you get errors on this next line, set (and export) your MW_INSTALL_PATH var. |
— | — | @@ -62,21 +62,23 @@ |
63 | 63 | $this->handleStompAntiMessages(); |
64 | 64 | $this->adapter->log( 'Removed ' . $this->removed_message_count . ' messages and antimessages.' ); |
65 | 65 | |
66 | | - //Pull a batch of CC orphans, keeping in mind that Things May Have Happened in the small slice of time since we handled the antimessages. |
67 | | - $orphans = $this->getStompOrphans(); |
68 | | - while ( count( $orphans ) && $this->keepGoing() ){ |
69 | | - //..do stuff. |
70 | | - foreach ( $orphans as $correlation_id => $orphan ) { |
71 | | - //process |
72 | | - if ( $this->rectifyOrphan( $orphan ) ){ |
73 | | - $this->addStompCorrelationIDToAckBucket( $correlation_id ); |
74 | | - $this->handled_ids[$correlation_id] = 'rectified'; |
75 | | - } else { |
76 | | - $this->handled_ids[$correlation_id] = 'error'; |
| 66 | + if ( $this->keepGoing() ){ |
| 67 | + //Pull a batch of CC orphans, keeping in mind that Things May Have Happened in the small slice of time since we handled the antimessages. |
| 68 | + $orphans = $this->getStompOrphans(); |
| 69 | + while ( count( $orphans ) && $this->keepGoing() ){ |
| 70 | + //..do stuff. |
| 71 | + foreach ( $orphans as $correlation_id => $orphan ) { |
| 72 | + //process |
| 73 | + if ( $this->rectifyOrphan( $orphan ) ){ |
| 74 | + $this->addStompCorrelationIDToAckBucket( $correlation_id ); |
| 75 | + $this->handled_ids[$correlation_id] = 'rectified'; |
| 76 | + } else { |
| 77 | + $this->handled_ids[$correlation_id] = 'error'; |
| 78 | + } |
77 | 79 | } |
| 80 | + $this->addStompCorrelationIDToAckBucket( false, true ); //ack all outstanding. |
| 81 | + $orphans = $this->getStompOrphans(); |
78 | 82 | } |
79 | | - $this->addStompCorrelationIDToAckBucket( false, true ); //ack all outstanding. |
80 | | - $orphans = $this->getStompOrphans(); |
81 | 83 | } |
82 | 84 | |
83 | 85 | $this->addStompCorrelationIDToAckBucket( false, true ); //ack all outstanding. |
— | — | @@ -159,6 +161,7 @@ |
160 | 162 | echo 'The STOMP message ' . $message->headers['message-id'] . " has no correlation ID!\n"; |
161 | 163 | } |
162 | 164 | } |
| 165 | + $this->addStompCorrelationIDToAckBucket( false, true ); //ack all outstanding. |
163 | 166 | $antimessages = stompFetchMessages( 'cc-limbo', $selector, 1000 ); |
164 | 167 | } |
165 | 168 | $this->addStompCorrelationIDToAckBucket( false, true ); //this just acks everything that's waiting for it. |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
166 | 169 | Merged /trunk/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php:r105640 |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php |
— | — | @@ -1134,23 +1134,17 @@ |
1135 | 1135 | if ( $is_orphan ){ |
1136 | 1136 | //save stats. |
1137 | 1137 | if (!isset($this->orphanstats) || !isset( $this->orphanstats[$original_status_code] ) ){ |
1138 | | - $this->orphanstats[$original_status_code] = 0; |
| 1138 | + $this->orphanstats[$original_status_code] = 1; |
1139 | 1139 | } else { |
1140 | 1140 | $this->orphanstats[$original_status_code] += 1; |
1141 | | - } |
1142 | | - |
1143 | | - if ( $original_status_code > 70 && !$gotCVV ){ |
1144 | | - $problemflag = true; |
1145 | | - $problemmessage = "Unable to retrieve orphan cvv/avs results (Communication problem?)."; |
1146 | | - } |
1147 | | - |
| 1141 | + } |
1148 | 1142 | } |
1149 | 1143 | if (!$order_status_results){ |
1150 | 1144 | $problemflag = true; |
1151 | 1145 | $problemmessage = "We don't have a Transaction WMF Status after doing a GET_ORDERSTATUS."; |
1152 | 1146 | } |
1153 | 1147 | switch ( $order_status_results ){ |
1154 | | - case 'failed' : |
| 1148 | + case 'failed' : |
1155 | 1149 | case 'revised' : |
1156 | 1150 | $add_antimessage = true; |
1157 | 1151 | $cancelflag = true; //makes sure we don't try to confirm. |
— | — | @@ -1160,6 +1154,11 @@ |
1161 | 1155 | $problemmessage = "GET_ORDERSTATUS reports that the payment is already complete."; |
1162 | 1156 | $add_antimessage = true; |
1163 | 1157 | break; |
| 1158 | + case 'pending' : |
| 1159 | + if ( $is_orphan && !$gotCVV ){ |
| 1160 | + $problemflag = true; |
| 1161 | + $problemmessage = "Unable to retrieve orphan cvv/avs results (Communication problem?)."; |
| 1162 | + } |
1164 | 1163 | } |
1165 | 1164 | } |
1166 | 1165 | |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1167 | 1166 | Merged /trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php:r105640 |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/activemq_stomp/activemq_stomp.php |
— | — | @@ -230,7 +230,9 @@ |
231 | 231 | 'fee' => '0', |
232 | 232 | 'gross' => $transaction['amount'], |
233 | 233 | 'net' => $transaction['amount'], |
234 | | - 'date' => $transaction['date'], |
| 234 | + //the following int casting fixes an issue that is more in Drupal/CiviCRM than here. |
| 235 | + //The code there should also be fixed. |
| 236 | + 'date' => ( int ) $transaction['date'], |
235 | 237 | ); |
236 | 238 | |
237 | 239 | return $message; |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/activemq_stomp/activemq_stomp.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
238 | 240 | Merged /trunk/extensions/DonationInterface/activemq_stomp/activemq_stomp.php:r105640,105642 |