jenkins-bot has submitted this change and it was merged.
Change subject: More logging around fraud filters
......................................................................
More logging around fraud filters
Log reasons for skipping the filter runs. Should help us figure out
why they are so seldom run in the orphan rectifier.
Bug: T145848
Change-Id: Ib0955a03261755222b4cebd05b2d1fbdf8a9fda4
---
M globalcollect_gateway/globalcollect.adapter.php
M globalcollect_gateway/orphan.adapter.php
2 files changed, 13 insertions(+), 3 deletions(-)
Approvals:
XenoRyet: Looks good to me, approved
jenkins-bot: Verified
diff --git a/globalcollect_gateway/globalcollect.adapter.php
b/globalcollect_gateway/globalcollect.adapter.php
index 1550afa..e54f98c 100644
--- a/globalcollect_gateway/globalcollect.adapter.php
+++ b/globalcollect_gateway/globalcollect.adapter.php
@@ -1659,11 +1659,18 @@
static $checked = array();
$oid = $this->getData_Unstaged_Escaped('order_id');
- if ( $this->getData_Unstaged_Escaped( 'payment_method' ) ===
'cc'
- && empty( $checked[$oid] )
- ) {
+ $method = $this->getData_Unstaged_Escaped( 'payment_method' );
+ if ( $method === 'cc' && empty( $checked[$oid] ) ) {
$this->runAntifraudFilters();
$checked[$oid] = true;
+ } else {
+ $message = 'Skipping fraud filters: ';
+ if ( !empty( $checked[$oid] ) ) {
+ $message .= "already checked order id '$oid'";
+ } else {
+ $message .= "payment method is '$method'";
+ }
+ $this->logger->info( $message );
}
}
diff --git a/globalcollect_gateway/orphan.adapter.php
b/globalcollect_gateway/orphan.adapter.php
index fbc84b4..296b0d3 100644
--- a/globalcollect_gateway/orphan.adapter.php
+++ b/globalcollect_gateway/orphan.adapter.php
@@ -201,7 +201,10 @@
// Don't bother unless we expect to be able to finalize this
payment.
if ( $action === FinalStatus::PENDING_POKE ) {
+ $this->logger->info( 'Final status is PENDING_POKE,
running fraud filters' );
parent::post_process_get_orderstatus();
+ } else {
+ $this->logger->info( "Skipping fraud filters for final
status $action." );
}
}
}
--
To view, visit https://gerrit.wikimedia.org/r/319957
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0955a03261755222b4cebd05b2d1fbdf8a9fda4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits