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

Mismatched Capitalization in Paypal Email Addresses Causes IPN to Fail

    XMLWordPrintable

    Details

    • Testing Instructions:
      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.
    • Workaround:
      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.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w49_MDL-31424_m25_paypalcase

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              cfollin Chris Follin
              Integrator:
              Dan Poltawski
              Tester:
              Damyon Wiese
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Jan/13