Paypal Enrolment Modification

Paypal Enrolment Modification

by Rehan Saleem -
Number of replies: 0

hello everyone,

i have applied a condition on paypal enrolment instances on enrol/index.php file after fulfilling the requirements paypal enrolment plugin appears under the course and prompt user to to buy the course from paypal but after clicking the paypal enrolment button it is not redirecting to the paypal payment method page i shall be very thankful to you solving this issue. Here is my modified code.

if ($_POST['usertext'] == '2233')
{
$enrols = enrol_get_plugins(true);
$enrolinstances = enrol_get_instances($course->id, true);
$forms = array();
foreach($enrolinstances as $instance) {
if (!isset($enrols[$instance->enrol])) {
continue;
}
$form = $enrols[$instance->enrol]->enrol_page_hook($instance);
if ($form) {
$forms[$instance->id] = $form;
}
}
}

Average of ratings: -