Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-31424

Mismatched Capitalization in Paypal Email Addresses Causes IPN to Fail

XMLWordPrintable

    • MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • w49_MDL-31424_m25_paypalcase
    • Hide

      Change the capitalization of the email address in the Paypal settings to match the email address as reported by Paypal in the IPN.

      Show
      Change the capitalization of the email address in the Paypal settings to match the email address as reported by Paypal in the IPN.
    • Hide

      see MDL-35456 for detailed info how to test PayPal

      Set up the Paypal plugin with a business email address that is different only in capitalization from your email address used with Paypal.
      Attempt to enrol into a course via Paypal.
      The IPN should not fail and you should be enrolled successfully into the course.

      Show
      see MDL-35456 for detailed info how to test PayPal — Set up the Paypal plugin with a business email address that is different only in capitalization from your email address used with Paypal. Attempt to enrol into a course via Paypal. The IPN should not fail and you should be enrolled successfully into the course.

      This code in enrol/paypal/ipn.php:

      if ($data->business != $plugin->get_config('paypalbusiness')) {   // Check that the email is the one we want it to be
        message_paypal_error_to_admin("Business email is {$data->business} (not ".
                         $plugin->get_config('paypalbusiness').")", $data);
        die;
      }

      causes the IPN to fail and Paypal reports a 404 when the email addresses are the same except for capitalization. For example, one in camelcase and one in lowercase. Since a difference merely of capitalization does not cause a problem with the IPN, both strings should be forced to the same case before comparing them. This will prevent IPNs from failing unnecessarily.

            skodak Petr Skoda
            cfollin Chris Follin
            Dan Poltawski Dan Poltawski
            Damyon Wiese Damyon Wiese
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.