Index: WAeUP_SRP/base/skins/waeup_epayment/interswitch_acco_cb.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/interswitch_acco_cb.py	(revision 2961)
+++ WAeUP_SRP/base/skins/waeup_epayment/interswitch_acco_cb.py	(revision 2962)
@@ -96,8 +96,7 @@
         try:
             wftool.doActionFor(acco_info['acco'],'pay_maintenance_fee',dest_container=acco_info['acco'])
-            return request.RESPONSE.redirect("%s/accommodation_view" % acco_info['student'].absolute_url())
         except:
             logger.info('%s no workflow action pay_maintenance_fee' % student_id)
-            return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())        
+            #return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
     else:
         logger.info('%s received unsuccessfull callback: %s' % (student_id,pd['resp_desc']))
@@ -106,47 +105,47 @@
     except:
         logger.info('%s no workflow action close' % student_id)
+    return request.RESPONSE.redirect("%s/accommodation_view" % acco_info['student'].absolute_url())
 
 
+#else:
+#    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']
+#    next_verdict = next_info['next_verdict']
+#    next_previous_verdict = next_info['next_previous_verdict']
+#
+#    if  resp == '00':
+#        if context.getStudentReviewState() == "school_fee_paid":
+#            logger.info('%s paid school_fee in state school_fee_paid' % (student_id))
+#        else:
+#            study_course = getattr(student,'study_course')
+#            try:
+#                wftool.doActionFor(study_course,'open')
+#            except:
+#                pass
+#            verdict = s_brain.verdict
+#            if next_previous_verdict == 'N/A':
+#                next_previous_verdict = ''
+#            study_course.getContent().edit(mapping= {'current_level': next_level_id,
+#                                                    'current_session': next_session_id,
+#                                                    'current_verdict': next_verdict,
+#                                                    'previous_verdict': next_previous_verdict,
+#                                                    })
+#            if next_transition:
+#                wftool.doActionFor(student,next_transition)
 
-else:
-    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']
-    next_verdict = next_info['next_verdict']
-    next_previous_verdict = next_info['next_previous_verdict']
-
-    if  resp == '00':
-        if context.getStudentReviewState() == "school_fee_paid":
-            logger.info('%s paid school_fee in state school_fee_paid' % (student_id))
-        else:
-            study_course = getattr(student,'study_course')
-            try:
-                wftool.doActionFor(study_course,'open')
-            except:
-                pass
-            verdict = s_brain.verdict
-            if next_previous_verdict == 'N/A':
-                next_previous_verdict = ''
-            study_course.getContent().edit(mapping= {'current_level': next_level_id,
-                                                    'current_session': next_session_id,
-                                                    'current_verdict': next_verdict,
-                                                    'previous_verdict': next_previous_verdict,
-                                                    })
-            if next_transition:
-                wftool.doActionFor(student,next_transition)
-
-        logger.info('%s received valid callback' % student_id)
-        referer = request.get('HTTP_REFERER','none')
-        logger.info('%s valid callback referer = %s' % (student_id,referer))
-        real_ip = request.get('HTTP_X_REAL_IP',"none")
-        logger.info('%s valid callback real_ip = %s' % (student_id,real_ip))
-    else:
-        logger.info('%s received unsuccessfull callback: %s' % (student_id,pd['resp_desc']))
-    try:
-        wftool.doActionFor(context,'close')
-    except:
-        logger.info('%s no workflow action close' % student_id)
+#        logger.info('%s received valid callback' % student_id)
+#        referer = request.get('HTTP_REFERER','none')
+#        logger.info('%s valid callback referer = %s' % (student_id,referer))
+#        real_ip = request.get('HTTP_X_REAL_IP',"none")
+#        logger.info('%s valid callback real_ip = %s' % (student_id,real_ip))
+#    else:
+#        logger.info('%s received unsuccessfull callback: %s' % (student_id,pd['resp_desc']))
+#    try:
+#        wftool.doActionFor(context,'close')
+#    except:
+#        logger.info('%s no workflow action close' % student_id)
 
 
Index: WAeUP_SRP/base/skins/waeup_utilities/close.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_utilities/close.py	(revision 2962)
+++ WAeUP_SRP/base/skins/waeup_utilities/close.py	(revision 2962)
@@ -0,0 +1,39 @@
+## Script (Python) "close"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST,transition='close'
+##title=
+##
+# $Id: close.py 1348 2007-01-25 17:06:21Z henrik $
+"""
+closes object
+"""
+
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+
+#if str(member) not in ('admin','joachim') or transition is None:
+#    return 'Forbidden!'
+
+if not context.isSectionOfficer() or transition is None:
+    return 'Forbidden!'
+
+import logging
+logger = logging.getLogger('Skins.close')
+
+pm = context.portal_membership
+member = pm.getAuthenticatedMember()
+
+request = context.REQUEST
+wftool = context.portal_workflow
+try:
+    wftool.doActionFor(context,transition)
+    logger.info('%s executed transition %s for %s' % (member,transition,context.getId()))
+except:
+    logger.info('%s tried to execute transition %s for %s, transition not allowed' % (member,transition,context.getId()))
+    return 'Transition not allowed!'
+
+return request.RESPONSE.redirect("%s" % context.absolute_url())
