MDL-7389 paypal plugin reports error when student correctly enrolled

This commit is contained in:
skodak
2006-11-13 22:25:14 +00:00
parent dc13c4f8a3
commit 558bfc50fe
+2 -2
View File
@@ -154,7 +154,7 @@
email_paypal_error_to_admin("Error while trying to insert valid transaction", $data);
}
if (enrol_into_course($course, $user, 'paypal')) {
if (!enrol_into_course($course, $user, 'paypal')) {
email_paypal_error_to_admin("Error while trying to enrol ".fullname($user)." in '$course->fullname'", $data);
die;
} else {
@@ -203,7 +203,7 @@
function email_paypal_error_to_admin($subject, $data) {
$admin = get_admin();
$site = get_admin();
$site = get_site();
$message = "$site->fullname: Transaction failed.\n\n$subject\n\n";