]> git.mjollnir.org Git - moodle.git/commitdiff
paypal MDL-20322 Make sure the currency is set correctly.
authormoodler <moodler>
Tue, 22 Sep 2009 01:53:39 +0000 (01:53 +0000)
committermoodler <moodler>
Tue, 22 Sep 2009 01:53:39 +0000 (01:53 +0000)
enrol/paypal/ipn.php

index bcfba8fe398aeeaa7b3de5a45188d0b16c8d1e1f..677cccdb1feb588f5480a55b180803649822413c 100644 (file)
                 die;
             }
 
+            // If currency is incorrectly set then someone maybe trying to cheat the system 
+
+            if ($data->mc_currency != $course->currency) {
+                email_paypal_error_to_admin("Currency does not match course settings, received: ".addslashes($data->mc_currency), $data);
+                die;
+            }
+
             // If status is pending and reason is other than echeck then we are on hold until further notice
             // Email user to let them know. Email admin.