Mwalker has submitted this change and it was merged.

Change subject: Log an obnoxious amount of debug data via the form chooser. 
Meant to be temporary: This should go away as soon as we have demystified 
ourselves.
......................................................................


Log an obnoxious amount of debug data via the form chooser.
Meant to be temporary: This should go away as soon as we have
demystified ourselves.

Change-Id: I5d9de01a667f5620e3ef2dbe4e04a3cc313562c2
---
M special/GatewayFormChooser.php
1 file changed, 29 insertions(+), 0 deletions(-)

Approvals:
  Mwalker: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/special/GatewayFormChooser.php b/special/GatewayFormChooser.php
index aae8e5b..82fe55d 100644
--- a/special/GatewayFormChooser.php
+++ b/special/GatewayFormChooser.php
@@ -66,6 +66,17 @@
 
                $redirectURL = self::buildPaymentsFormURL( $form, $params );
 
+               $debug_mess = __FUNCTION__;
+               $ctid = @$GET['contribution_tracking_id'];
+               if ( !is_null( $ctid ) ) {
+                       $debug_mess .= " $ctid";
+               }
+               $debug_mess .= " GatewayFormChooser built URL '$redirectURL' 
for country '$country', currency '$currency', method '$paymentMethod', 
submethod '$paymentSubMethod', recurring: '$recurring', gateway '$gateway'.";
+               GatewayAdapter::log( $debug_mess, LOG_DEBUG );
+
+               error_log( $debug_mess );
+
+
                // Perform the redirection
                $this->getOutput()->redirect( $redirectURL );
        }
@@ -270,6 +281,15 @@
                $forms = self::getAllValidForms( $country, $currency, 
$payment_method, $payment_submethod, $recurring, $gateway );
                $form = self::pickOneForm( $forms, $currency, $country );
 
+               //done playing.
+               $debug_mess = __FUNCTION__;
+               $ctid = @$GET['contribution_tracking_id'];
+               if ( !is_null( $ctid ) ) {
+                       $debug_mess .= " $ctid";
+               }
+               $debug_mess .= " Selected '$form' for country '$country', 
currency '$currency', method '$payment_method', submethod '$payment_submethod', 
recurring: '$recurring', gateway '$gateway'.";
+               GatewayAdapter::log( $debug_mess, LOG_DEBUG );
+
                //TODO:
                //This here, would be an excellent place to default to
                //"sorry, we don't support that thing you're trying to do."
@@ -338,6 +358,15 @@
                if ( is_array( $forms ) && array_key_exists( $ffname, $forms ) 
) {
                        return true;
                }
+
+               $debug_mess = __FUNCTION__;
+               $ctid = @$GET['contribution_tracking_id'];
+               if ( !is_null( $ctid ) ) {
+                       $debug_mess .= " $ctid";
+               }
+               $debug_mess .= " Form '$ffname' found to be invalid for country 
'$country', currency '$currency', method '$payment_method', submethod 
'$payment_submethod', recurring: '$recurring', gateway '$gateway'.";
+               GatewayAdapter::log( $debug_mess, LOG_DEBUG );
+
                return false;
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/99791
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d9de01a667f5620e3ef2dbe4e04a3cc313562c2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Katie Horn <kh...@wikimedia.org>
Gerrit-Reviewer: Mwalker <mwal...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to