From 7de98bbd010babe1316b36544970b188d09ad740 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Fri, 24 Jul 2020 13:22:08 -0400 Subject: [PATCH] added a block of code to help debug fraud details this code can be uncommented to help debug information associated with a fraud attack, such as getting the contribution page id, etc. --- CRM/Core/Payment/TrustCommerce.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CRM/Core/Payment/TrustCommerce.php b/CRM/Core/Payment/TrustCommerce.php index 728404b..4645106 100644 --- a/CRM/Core/Payment/TrustCommerce.php +++ b/CRM/Core/Payment/TrustCommerce.php @@ -320,6 +320,20 @@ class CRM_Core_Payment_TrustCommerce extends CRM_Core_Payment { } private function _isParamsBlacklisted($tc_params) { + + ///// debug help + // + //if ($_SERVER['REMOTE_ADDR'] === '74.94.156.211') { + // $test-tc-log = fopen("/tmp/test-tc-log", "a"); + // + // fwrite($test-tc-log, $_SERVER['REMOTE_ADDR']."\n"); + // fwrite($test-tc-log, print_r($this->_params[contributionPageID], true)."\n"); + // //fwrite($test-tc-log, print_r($tc_params, true)."\n"); + // //fwrite($test-tc-log, print_r($this, true)."\n"); + // + // fclose("$test-tc-log"); + //} + // quidam 18/Jun/2020 // block brazil small donations if(($tc_params['country'] == 'BR') && ($tc_params['amount'] < 2000)) { -- 2.25.1