Student enrollment status as 'Not current' when enrollment using PayUmoney payment plugin.

Student enrollment status as 'Not current' when enrollment using PayUmoney payment plugin.

by sarendar vennapureddy -
Number of replies: 6

HI,

I have installed payumoney enrollment plugin. 

While students are enrolling to course suing payment gateway below message is displaying after completion of successful payment.

"Thank you for your payment! Unfortunately your payment has not yet been fully processed, and you are not yet registered to enter the course "Payment Test". Please try continuing to the course in a few seconds, but if you continue to have trouble then please alert the Teacher or the site administrator"

Students are enrolled to course but partially, and student enrollment status is 'Not Current',

But payment is successful and money added to my valet also. 

And i have checked with enrollment dates kept past dates, Tried with many enrollment dates as past and future.

Few days back this issue not getting any where, But now getting, do i need to change any settings.

few days back i changed my site from http to https, is this cause nay problem?

Can any one please provide solution.


Average of ratings: -
In reply to sarendar vennapureddy

Re:

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
If you changed from http to https then that is most probably the problem. You need to change the url of your site in the payumoney site to include the https
In reply to Emma Richardson

Re:

by sarendar vennapureddy -
Hi Emma,
Thanks for reply.
Your replay in this https://moodle.org/mod/forum/discuss.php?d=331586 post resolved my issue.
Root cause: As per Payumoney plugin, enrolment start and ens date storing current date in Database.
Solution: Changed enrollment start date and end date as per settings in source code. now students are able to enroll to course successfully.

But Here i got one more issue that is.
After student enrolled to course using payment is unable to see activities and resources in course. But manual enrolled user able to see.
What could be the problem. Can you please help me on this.


In reply to sarendar vennapureddy

Re:

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Sounds like they are not getting the correct role. Check that they are being enrolled as students. Or are you using groups maybe and they are not being added to a group?
In reply to Emma Richardson

Re:

by sarendar vennapureddy -
I have checked.... User assigned to student role only.. And there is no groups am using for that course.

And one thing i found that, After enrolled through payment students unable to see activities at that point. surprised me that   If student logout and login then able to see activities in that course.

In reply to sarendar vennapureddy

Re:

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Try clearing your caches and see if that resolves it. If not, I suspect a bug with the payment plugin.
In reply to Emma Richardson

Re:

by sarendar vennapureddy -
Yes, The problem with Plugin source code.
For student enrollment they are using direct code(inserting records into respective tables).
I removed that code and simply called 'enrol_user' function. Then my issue is resolved.

$plugin = enrol_get_plugin('payumoney');
$courseConditions = array ('enrol' =>'payumoney','courseid'=>$arraycourseinstance[0],'roleid'=>5);
$enroldates = $DB->get_record('enrol',$courseConditions);

if ($responsearray['status'] == "success") {
/* Inserting value to user_enrolments table */
// $arraycourseinstance[1] means user id
$roleid = 5;
$plugin->enrol_user($enroldates, $arraycourseinstance[1], $roleid, $enroldates->enrolstartdate, $enroldates->enrolenddate);