Index: WAeUP_SRP/base/skins/waeup_epayment/getPaymentsFolderInfo.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/getPaymentsFolderInfo.py	(revision 2451)
+++ WAeUP_SRP/base/skins/waeup_epayment/getPaymentsFolderInfo.py	(revision 2454)
@@ -71,5 +71,7 @@
 info['prod_id'] = '61'
 session = s_brain.session
-info['next_session'], info['next_session_str'] = context.getNextSessionId(session)
+next_info = context.getNextInfo(s_brain)
+info['next_session'] = next_info['next_session_id']
+info['next_session_str'] = next_info['next_session_str']
 
 info['student_name'] = s_brain.name
Index: WAeUP_SRP/base/skins/waeup_epayment/interswitch_cb.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/interswitch_cb.py	(revision 2451)
+++ WAeUP_SRP/base/skins/waeup_epayment/interswitch_cb.py	(revision 2454)
@@ -52,5 +52,5 @@
     pd[pdk] = request.get(rc,'')
 
-# for testing purposes
+## for testing purposes
 #pd['resp_desc'] = 'Simulated Callback'
 #pd['resp_pay_reference'] = 'XXXX'
@@ -74,5 +74,11 @@
 s_brain = context.students_catalog(id=student_id)[0]
 session = s_brain.session
-next_session, next_session_str = context.getNextSessionId(session)
+#next_session, next_session_str = context.getNextSessionId(session)
+
+next_info = context.getNextInfo(s_brain)
+next_session_id = next_info['next_session_id']
+next_session_str = next_info['next_session_str']
+next_level_id = next_info['next_level_id']
+next_transition = next_info['next_transition']
 
 if  resp == '00':
@@ -80,16 +86,14 @@
         logger.info('%s paid school_fee in state school_fee_paid' % (student_id))
     else:
-        if next_session == context.getSessionId()[-2:]:
-            wftool.doActionFor(student,'pay_school_fee')
-        else:
-            study_course = getattr(student,'study_course')
-            try:
-                wftool.doActionFor(study_course,'open')
-            except:
-                pass
-            study_course_doc = study_course.getContent()
-            next_level = "%s" % (int(s_brain.level) + 100)
-            study_course_doc.edit(mapping= {'current_level': next_level,
-                                            'current_session': next_session,})
+        study_course = getattr(student,'study_course')
+        try:
+            wftool.doActionFor(study_course,'open')
+        except:
+            pass
+        study_course.getContent().edit(mapping= {'current_level': next_level_id,
+                                                 'current_session': next_session_id,})
+        if next_transition:
+            wftool.doActionFor(student,next_transition)    
+
     logger.info('%s received valid callback' % student_id)
     referer = request.get('HTTP_REFERER','none')
Index: WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py	(revision 2451)
+++ WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py	(revision 2454)
@@ -24,5 +24,5 @@
 if context.portal_membership.isAnonymousUser():
     return None
-
+wftool = context.portal_workflow
 lt = context.portal_layouts
 request = context.REQUEST
@@ -34,18 +34,15 @@
 student = getattr(students,student_id)
 s_brain = context.students_catalog(id=student_id)[0]
-next_info = context.getNextInfo(s_brain)
-next_session_id = next_info['next_session_id'] 
-next_session_str = next_info['next_session_str']
-next_level_id = next_info['next_level_id'] 
-next_transition = next_info['next_transition'] 
-study_course = getattr(student,'study_course')
-study_course.getContent().edit(mapping= {'current_level': next_level_id,
-                                         'current_session': next_session_id,})
-if next_transition:
-    wftool.doActionFor(student,next_transition)
 
 # session = s_brain.session
 # next_session, next_session_str = context.getNextSessionId(session)
-# validate = request.has_key("cpsdocument_create_button")
+
+next_info = context.getNextInfo(s_brain)
+next_session_id = next_info['next_session_id']
+next_session_str = next_info['next_session_str']
+next_level_id = next_info['next_level_id']
+next_transition = next_info['next_transition']
+
+validate = request.has_key("cpsdocument_create_button")
 res,psm,ds = lt.renderLayout(layout_id= 'student_schoolfee',
                       schema_id= 'payment',
@@ -113,13 +110,21 @@
     payment.getContent().edit(mapping=info)
     wftool.doActionFor(payment,'close')
-    if next_session == context.getSessionId()[-2:]:
-        wftool.doActionFor(student,'pay_school_fee')
-    else:
-        study_course = getattr(student,'study_course')
-        #wftool.doActionFor(study_course,'open')
-        study_course_doc = study_course.getContent()
-        next_level = "%s" % (int(s_brain.level) + 100)
-        study_course_doc.edit(mapping= {'current_level': next_level,
-                                        'current_session': next_session,})
+
+    study_course = getattr(student,'study_course')
+    study_course.getContent().edit(mapping= {'current_level': next_level_id,
+                                             'current_session': next_session_id,})
+    if next_transition:
+        wftool.doActionFor(student,next_transition)    
+    
+    #if next_session == context.getSessionId()[-2:]:
+    #    wftool.doActionFor(student,'pay_school_fee')
+    #else:
+    #    study_course = getattr(student,'study_course')
+    #    #wftool.doActionFor(study_course,'open')
+    #    study_course_doc = study_course.getContent()
+    #    next_level = "%s" % (int(s_brain.level) + 100)
+    #    study_course_doc.edit(mapping= {'current_level': next_level,
+    #                                    'current_session': next_session,})
+    
     logger.info('%s paid school fee by scratch card' % student_id)
 else:
