Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php |
— | — | @@ -42,7 +42,6 @@ |
43 | 43 | if ( $this->adapter->checkTokens() ) { |
44 | 44 | if ( $this->adapter->posted) { |
45 | 45 | // The form was submitted and the payment method has been set |
46 | | - $this->adapter->log( "Form posted and payment method set." ); |
47 | 46 | // Check form for errors |
48 | 47 | $form_errors = $this->validateForm( $this->errors ); |
49 | 48 | // If there were errors, redisplay form, otherwise proceed to next step |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/payflowpro_gateway |
___________________________________________________________________ |
Modified: svn:mergeinfo |
50 | 49 | Merged /trunk/extensions/DonationInterface/payflowpro_gateway:r101207 |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php |
— | — | @@ -89,7 +89,6 @@ |
90 | 90 | $wgOut->addHTML( "<br>Redirecting to page $go" ); |
91 | 91 | $wgOut->redirect( $go ); |
92 | 92 | } |
93 | | - $this->adapter->log( "Not posted, or not processed. Showing the form for the first time." ); |
94 | 93 | } else { |
95 | 94 | if ( !$this->adapter->isCache() ) { |
96 | 95 | // if we're not caching, there's a token mismatch |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php |
— | — | @@ -87,8 +87,6 @@ |
88 | 88 | if ( $this->adapter->checkTokens() ) { |
89 | 89 | if ( $this->adapter->posted ) { |
90 | 90 | // The form was submitted and the payment method has been set |
91 | | - $this->adapter->log( "Form posted and payment method set." ); |
92 | | - |
93 | 91 | /* |
94 | 92 | * The $payment_method should default to false. |
95 | 93 | * |
— | — | @@ -133,7 +131,6 @@ |
134 | 132 | $result = $this->adapter->do_transaction( 'GET_ORDERSTATUS' ); |
135 | 133 | $this->displayResultsForDebug( $result ); |
136 | 134 | } |
137 | | - $this->adapter->log( "Not posted, or not processed. Showing the form for the first time." ); |
138 | 135 | $this->displayForm( $this->errors ); |
139 | 136 | } |
140 | 137 | } else { |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php |
— | — | @@ -482,7 +482,7 @@ |
483 | 483 | $xmlString = $this->stripXMLResponseHeaders( $rawResponse ); |
484 | 484 | $displayXML = $this->formatXmlString( $xmlString ); |
485 | 485 | $realXML = new DomDocument( '1.0' ); |
486 | | - self::log( "Here is the Raw XML: " . $displayXML ); //I am apparently a huge fibber. |
| 486 | + self::log( $this->getData( 'contribution_tracking_id' ) . ": Raw XML Response:\n" . $displayXML ); //I am apparently a huge fibber. |
487 | 487 | $realXML->loadXML( trim( $xmlString ) ); |
488 | 488 | return $realXML; |
489 | 489 | } |
— | — | @@ -560,8 +560,6 @@ |
561 | 561 | break; |
562 | 562 | } |
563 | 563 | |
564 | | - |
565 | | - self::log( "Returned Data: " . print_r( $data, true ) ); |
566 | 564 | return $data; |
567 | 565 | } |
568 | 566 | |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/gateway_common/gateway.adapter.php |
— | — | @@ -566,9 +566,7 @@ |
567 | 567 | $this->xmlDoc->appendChild( $node ); |
568 | 568 | $xml = $this->xmlDoc->saveXML(); |
569 | 569 | $xmlStart = strpos( $xml, "<XML>" ); |
570 | | - self::log( "XML START" . $xmlStart ); |
571 | 570 | $xml = substr( $xml, $xmlStart ); |
572 | | - self::log( "XML stubby thing..." . $xml ); |
573 | 571 | |
574 | 572 | return $xml; |
575 | 573 | } |
— | — | @@ -616,7 +614,6 @@ |
617 | 615 | $this->runPreProcess(); //many hooks get fired here... |
618 | 616 | |
619 | 617 | if ( $this->action != 'process' ) { |
620 | | - self::log( "Transaction failed pre-process checks." . print_r( $this->getData(), true ) ); |
621 | 618 | return array( |
622 | 619 | 'status' => false, |
623 | 620 | //TODO: appropriate messages. |
— | — | @@ -737,7 +734,7 @@ |
738 | 735 | } |
739 | 736 | |
740 | 737 | // log that the transaction is essentially complete |
741 | | - self::log( $this->getData( 'order_id' ) . " Transaction complete." ); |
| 738 | + self::log( $this->getData( 'contribution_tracking_id' ) . " Transaction complete." ); |
742 | 739 | |
743 | 740 | //Session Handling |
744 | 741 | //getTransactionStatus works here like this, because it only returns |
— | — | @@ -909,12 +906,6 @@ |
910 | 907 | $headers = $this->getCurlBaseHeaders(); |
911 | 908 | $headers[] = 'Content-Length: ' . strlen( $data ); |
912 | 909 | |
913 | | - if ( $this->getCommunicationType() === 'xml' ) { |
914 | | - self::log( "Sending Data: " . $this->formatXmlString( $data ) ); |
915 | | - } else { |
916 | | - self::log( "Sending Data: " . $data ); |
917 | | - } |
918 | | - |
919 | 910 | $curl_opts = $this->getCurlBaseOpts(); |
920 | 911 | $curl_opts[CURLOPT_HTTPHEADER] = $headers; |
921 | 912 | $curl_opts[CURLOPT_POSTFIELDS] = $data; |
— | — | @@ -930,27 +921,27 @@ |
931 | 922 | $results = array(); |
932 | 923 | |
933 | 924 | while ( $i++ <= 3 ) { |
934 | | - self::log( $this->postdatadefaults['order_id'] . ' Preparing to send transaction to ' . self::getGatewayName() ); |
| 925 | + self::log( $this->getData( 'contribution_tracking_id' ) . ' Preparing to send transaction to ' . self::getGatewayName() ); |
935 | 926 | $results['result'] = curl_exec( $ch ); |
936 | 927 | $results['headers'] = curl_getinfo( $ch ); |
937 | 928 | |
938 | 929 | if ( $results['headers']['http_code'] != 200 && $results['headers']['http_code'] != 403 ) { |
939 | | - self::log( $this->postdatadefaults['order_id'] . ' Failed sending transaction to ' . self::getGatewayName() . ', retrying' ); |
| 930 | + self::log( $this->getData( 'contribution_tracking_id' ) . ' Failed sending transaction to ' . self::getGatewayName() . ', retrying' ); |
940 | 931 | sleep( 1 ); |
941 | 932 | } elseif ( $results['headers']['http_code'] == 200 || $results['headers']['http_code'] == 403 ) { |
942 | | - self::log( $this->postdatadefaults['order_id'] . ' Finished sending transaction to ' . self::getGatewayName() ); |
| 933 | + self::log( $this->getData( 'contribution_tracking_id' ) . ' Finished sending transaction to ' . self::getGatewayName() ); |
943 | 934 | break; |
944 | 935 | } |
945 | 936 | } |
946 | 937 | |
947 | | - $this->saveCommunicationStats( __FUNCTION__, $this->getCurrentTransaction(), "Request:" . print_r( $data, true ) . "\nResponse" . print_r( $results, true ) ); |
| 938 | + $this->saveCommunicationStats( __FUNCTION__, $this->getCurrentTransaction(), "Response" . print_r( $results, true ) ); |
948 | 939 | |
949 | 940 | if ( $results['headers']['http_code'] != 200 ) { |
950 | 941 | $results['result'] = false; |
951 | 942 | //TODO: i18n here! |
952 | 943 | //TODO: But also, fire off some kind of "No response from the gateway" thing to somebody so we know right away. |
953 | 944 | $results['message'] = 'No response from ' . self::getGatewayName() . '. Please try again later!'; |
954 | | - self::log( $this->postdatadefaults['order_id'] . ' No response from ' . self::getGatewayName() . ': ' . curl_error( $ch ) ); |
| 945 | + self::log( $this->getData( 'contribution_tracking_id' ) . ' No response from ' . self::getGatewayName() . ': ' . curl_error( $ch ) ); |
955 | 946 | curl_close( $ch ); |
956 | 947 | return false; |
957 | 948 | } |
— | — | @@ -967,7 +958,7 @@ |
968 | 959 | $xmlStart = strpos( $rawResponse, '<RESPONSE' ); |
969 | 960 | } |
970 | 961 | if ( $xmlStart == false ) { //Still false. Your Head Asplode. |
971 | | - self::log( "Wow, that was so messed up I couldn't even parse the response, so here's the thing in its entirety:\n" . $rawResponse ); |
| 962 | + self::log( "Completely Mangled Response:\n" . $rawResponse ); |
972 | 963 | return false; |
973 | 964 | } |
974 | 965 | $justXML = substr( $rawResponse, $xmlStart ); |
— | — | @@ -1168,14 +1159,12 @@ |
1169 | 1160 | if ( $upper >= $code ) { //you've arrived. It's either here or it's nowhere. |
1170 | 1161 | if ( is_array( $val ) ) { |
1171 | 1162 | if ( $val['lower'] <= $code ) { |
1172 | | - $this->saveCommunicationStats( __FUNCTION__, $transaction, "code = $code" ); |
1173 | 1163 | return $val['action']; |
1174 | 1164 | } else { |
1175 | 1165 | return null; |
1176 | 1166 | } |
1177 | 1167 | } else { |
1178 | 1168 | if ( $upper === $code ) { |
1179 | | - $this->saveCommunicationStats( __FUNCTION__, $transaction, "code = $code" ); |
1180 | 1169 | return $val; |
1181 | 1170 | } else { |
1182 | 1171 | return null; |
— | — | @@ -1249,8 +1238,6 @@ |
1250 | 1239 | //'language' => '', |
1251 | 1240 | ); |
1252 | 1241 | $transaction += $this->getDisplayData(); |
1253 | | - |
1254 | | - self::log( "Intended STOMP transaction: " . print_r( $transaction, true ) ); |
1255 | 1242 | |
1256 | 1243 | try { |
1257 | 1244 | wfRunHooks( $hook, array( $transaction ) ); |
— | — | @@ -1511,9 +1498,9 @@ |
1512 | 1499 | return; |
1513 | 1500 | } |
1514 | 1501 | // allow any external validators to have their way with the data |
1515 | | - self::log( $this->getData( 'order_id' ) . " Preparing to query MaxMind" ); |
| 1502 | + self::log( $this->getData( 'contribution_tracking_id' ) . " Preparing to query MaxMind" ); |
1516 | 1503 | wfRunHooks( 'GatewayValidate', array( &$this ) ); |
1517 | | - self::log( $this->getData( 'order_id' ) . ' Finished querying Maxmind' ); |
| 1504 | + self::log( $this->getData( 'contribution_tracking_id' ) . ' Finished querying Maxmind' ); |
1518 | 1505 | |
1519 | 1506 | // if the transaction was flagged for review |
1520 | 1507 | if ( $this->action == 'review' ) { |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/gateway_common/DonationData.php |
— | — | @@ -101,7 +101,6 @@ |
102 | 102 | * populateData helper function |
103 | 103 | * If donor session data has been set, pull the fields in the session that |
104 | 104 | * are populated, and merge that with the data set we already have. |
105 | | - * Then, unset the session variable to avoid later confusion. |
106 | 105 | */ |
107 | 106 | function integrateDataFromSession(){ |
108 | 107 | self::ensureSession(); |
— | — | @@ -478,17 +477,15 @@ |
479 | 478 | $sessionToken = $this->getEditToken( $salt ); |
480 | 479 | if ( $val != $sessionToken ) { |
481 | 480 | wfDebug( "DonationData::matchEditToken: broken session data\n" ); |
| 481 | + //and reset the token for next time. |
| 482 | + $this->expunge( 'token' ); |
482 | 483 | } |
483 | | - $this->log( "Val = $val" ); |
484 | | - $this->log( "Session Token = $sessionToken" ); |
485 | 484 | return $val == $sessionToken; |
486 | 485 | } |
487 | 486 | |
| 487 | + |
488 | 488 | /** |
489 | | - * Unset the payflow edit token from a user's session. |
490 | | - * |
491 | | - * TODO: Get rid of this, if we end up using the new, much more draconian |
492 | | - * killAllSessionEverything(). |
| 489 | + * unsets the edit token in the user's session. |
493 | 490 | */ |
494 | 491 | function unsetEditToken() { |
495 | 492 | $gateway_ident = $this->gatewayID; |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface |
___________________________________________________________________ |
Modified: svn:mergeinfo |
496 | 493 | Merged /trunk/extensions/DonationInterface:r101207 |