Log invalid receiver email in PayPal callback
authorNiklas (Krymonota) <Krymonota@users.noreply.github.com>
Mon, 25 May 2020 15:43:08 +0000 (17:43 +0200)
committerNiklas (Krymonota) <Krymonota@users.noreply.github.com>
Mon, 25 May 2020 15:43:08 +0000 (17:43 +0200)
This adjustment should make it easier for administrators to identify the cause of this exception.

wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php

index 78be8414aa51efe6a34c7fe6b61f1dc20f3d2500..f6420c30ad5d9c8eddfc0ca505420ca307bb52f4 100644 (file)
@@ -56,7 +56,7 @@ class PaypalCallbackAction extends AbstractAction {
                        
                        // Check that receiver_email is your Primary PayPal email
                        if (strtolower($_POST['receiver_email']) != strtolower(PAYPAL_EMAIL_ADDRESS)) {
-                               throw new SystemException('invalid receiver_email');
+                               throw new SystemException("Mismatching receiver_email '" . $_POST['receiver_email'] . "', expected '".PAYPAL_EMAIL_ADDRESS."'.");
                        }
                        
                        // get token