Index: WAeUP_SRP/trunk/skins/waeup_uniben/admission_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_uniben/admission_form.pt	(revision 8026)
+++ WAeUP_SRP/trunk/skins/waeup_uniben/admission_form.pt	(revision 8028)
@@ -13,5 +13,5 @@
                       app_email info/app_doc/app_email|nothing;
                       app_passport info/has_passport;
-                      data_complete python:app_passport and app_email;
+                      data_complete python:True;
                       ">
           
@@ -84,5 +84,8 @@
                        />
                 <input tal:condition="python:review_state in ('admitted', 'objection_raised',) and data_complete" type="submit" name="start_clearance:method"
-                       class="context" value="Continue" 
+                       class="context" value="Enter Clearance PIN"
+                       />
+                <input tal:condition="python:review_state in ('admitted', 'objection_raised',) and data_complete" type="submit" name="payments:method"
+                       class="context" value="Pay Acceptance Fee"
                        />                       
        </form>
Index: WAeUP_SRP/trunk/skins/waeup_uniben/enter_tranzact_pin.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_uniben/enter_tranzact_pin.pt	(revision 8026)
+++ WAeUP_SRP/trunk/skins/waeup_uniben/enter_tranzact_pin.pt	(revision 8028)
@@ -3,5 +3,5 @@
   <metal:body use-macro="here/main_template/macros/master">
     <metal:main fill-slot="main">
-      <h3>Re-query eTranzact payment!</h3>
+      <h3>Query eTranzact payment!</h3>
       <br />
       <form id="form1" name="form1" method="post" tal:attributes= "action query_url">
Index: WAeUP_SRP/trunk/skins/waeup_uniben/etranzact_cb.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_uniben/etranzact_cb.py	(revision 8028)
+++ WAeUP_SRP/trunk/skins/waeup_uniben/etranzact_cb.py	(revision 8028)
@@ -0,0 +1,193 @@
+## Script (Python) "tranzact_cb"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+payment callback
+"""
+import logging
+logger = logging.getLogger('Skins.etranzact_cb')
+from AccessControl import Unauthorized
+import DateTime
+
+if context.portal_membership.isAnonymousUser():
+    return None
+
+request = context.REQUEST
+students = context.portal_url.getPortalObject().campus.students
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+#student_id = context.getStudentId()
+access_info = context.waeup_tool.getAccessInfo(context)
+student_id = access_info['student_id']
+if not context.isSectionOfficer() and (student_id is None or student_id != member_id):
+    logger.info('%s tried to access payment object of %s' % (member_id,student_id))
+    referer = request.get('HTTP_REFERER','none')
+    logger.info('%s:%s illegal access, referer = %s' % (member_id,student_id,referer))
+    real_ip = request.get('HTTP_X_REAL_IP',"none")
+    logger.info('%s:%s illegal access, real_x_ip = %s' % (member_id,student_id,real_ip))
+    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+referer = request.get('HTTP_REFERER','none')
+real_ip = request.get('HTTP_X_REAL_IP',"none")
+logger.info('%s, callback referer = %s, IP = %s' % (student_id,referer,real_ip))
+
+ontest = True
+
+if not ontest and not 'xyz' in referer and not 'waeup.org' in referer:
+    logger.info('%s, wrong callback referer %s, callback rejected, IP = %s' % (student_id,referer,real_ip))
+    return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
+
+student = getattr(students,student_id)
+
+success = request.get('SUCCESS')
+
+logger.info('SUCCESS: %s' % success)
+
+if success == '-1':
+    logger.info('%s requeried payment %s for %s without success' % (member,context.getId(),student_id))
+    return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
+
+
+# Example:
+#'RECEIPT_NO=5001109085339
+#&PAYMENT_CODE=500856521315472785095
+#&MERCHANT_CODE=0570019903
+#&TRANS_AMOUNT=5000.0
+#&TRANS_DATE=2011/09/08 10:06:31
+#&TRANS_DESCR=Trade%20-%20Tel%20line%20installation%20EO20474-Obinna%20Mbagwu
+#&CUSTOMER_ID=EO20474
+#&BANK_CODE=500
+#&BRANCH_CODE=001
+#&SERVICE_ID=EO20474
+#&CUSTOMER_NAME=Obinna%20Mbagwu
+#&CUSTOMER_ADDRESS=No%207%20Park%20View%20Estate%20Ikoyi
+#&TELLER_ID=etzbankteller
+#&USERNAME=N/A
+#&PASSWORD=N/A
+#&BANK_NAME=eTranzact%20Test%20Bank
+#&BRANCH_NAME=ETZ%20BANK%20HEAD%20OFFICE
+#&CHANNEL_NAME=Bank
+#&PAYMENT_METHOD_NAME=Cash
+#&PAYMENT_CURRENCY=566
+#&TRANS_TYPE=002
+#&TRANS_FEE=0.0
+#&TYPE_NAME=Trade%20-%20Tel%20line%20installation
+#&LEAD_BANK_CODE=057
+#&LEAD_BANK_NAME=eTranzact%20Test%20Bank'
+
+
+success = request.get('SUCCESS').split('&')
+success_dict = dict([tuple(i.split('=')) for i in success])
+
+pay_doc = context.getContent()
+
+if pay_doc['order_id'] != success_dict['PAYMENT_CODE'] and not ontest :
+    logger.info('%s requeried payment %s for %s but wrong payment code %s returned' % (member,context.getId(),student_id,success_dict['PAYMENT_CODE']))
+    return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
+
+if pay_doc['amount'] != success_dict['TRANS_AMOUNT'] and not ontest :
+    logger.info('%s requeried payment %s for %s but wrong amount %s returned' % (member,context.getId(),student_id,success_dict['TRANS_AMOUNT']))
+    return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
+
+pd = {}
+pd['resp_desc'] = success_dict['TRANS_DESCR'].replace('%20',' ')
+pd['resp_pay_reference'] = success_dict['RECEIPT_NO']
+pd['resp_code'] = 'ET'
+pd['resp_approved_amount'] = success_dict['TRANS_AMOUNT']
+pd['status'] = 'paid'
+
+pay_doc.edit(mapping = pd)
+
+s_brain = context.students_catalog(id=student_id)[0]
+session = s_brain.session
+
+if pay_doc.category == 'schoolfee':
+    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 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)
+
+
+elif pay_doc.category == 'hostel_maintenance':
+
+    ## callback function for accommodation_catalog method
+    data={}
+    data['acco_maint_date'] = pay_doc.date
+    data['catkey'] =student_id + '|' + pay_doc.session_id
+    data['acco_maint_fee'] = pay_doc.amount
+    data['acco_maint_pay_id'] = context.getId()
+    data['reservation_status'] = 'maintenance_fee_paid'
+    context.accommodation_catalog.modifyRecord(**data)
+
+    ## callback function for accommodation object method (deactivated since March 2011)
+    #acco_info = context.getAccommodationInfo()
+    #d = {}
+    #d['acco_maint_date'] = pay_doc.date
+    #d['acco_maint_fee'] = pay_doc.amount
+    #d['acco_maint_pay_id'] = context.getId()
+    #try:
+    #    acco_info['acco_doc'].edit(mapping=d)
+    #except:
+    #    logger.info('%s requeried payment though maintenance already paid' % student_id)
+    #try:
+    #    wftool.doActionFor(acco_info['acco'],'pay_maintenance_fee',dest_container=acco_info['acco'])
+    #except:
+    #    logger.info('%s no workflow action pay_maintenance_fee' % student_id)
+
+elif pay_doc.category == 'acceptance':
+    if context.getStudentReviewState() in ('admitted', 'objection_raised'):
+        logger.info('%s paid acceptance fee' % (student_id))
+        current = DateTime.DateTime()
+        wf = context.portal_workflow
+        info = context.getClearanceInfo()
+        wftool.doActionFor(student,'enter_clearance_pin')
+        context.waeup_tool.changeWorkflowState(info['clear'], 'opened')
+        context.waeup_tool.changeWorkflowState(info['app'], 'closed')
+        dc = {}
+        app_doc = info['app_doc']
+        #dc['clr_ac_pin'] = pay_doc.order_id
+        dc['clr_ac_date'] = current
+        dc['entry_date'] = current
+        info['clear_doc'].edit(mapping = dc)
+        if info['penalty']:
+            logger.info('%s started late clearance' % (info['id']))
+        #return redirect("%s/clearance_edit_form" % info['clear'].absolute_url())
+
+logger.info('%s received valid callback' % student_id)
+
+#review_state = wftool.getInfoFor(context,'review_state',None)
+#if review_state == 'opened':
+#    wftool.doActionFor(context,'close')
+context.waeup_tool.changeWorkflowState(context, 'closed')
+
+return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
Index: WAeUP_SRP/trunk/skins/waeup_uniben/etranzact_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_uniben/etranzact_form.pt	(revision 8026)
+++ WAeUP_SRP/trunk/skins/waeup_uniben/etranzact_form.pt	(revision 8028)
@@ -5,8 +5,8 @@
     <br />
     <span tal:condition="not: info/payment_possible">
-      No payment information for your course available.
+      No payment information available.
     </span>
     <span tal:condition="info/payment_possible">
-      <form method="post" action="pay_etranzact">
+      <form method="post" tal:attributes="action info/action">
         <table>
           <tr>
Index: WAeUP_SRP/trunk/skins/waeup_uniben/getPaymentsFolderInfo.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_uniben/getPaymentsFolderInfo.py	(revision 8026)
+++ WAeUP_SRP/trunk/skins/waeup_uniben/getPaymentsFolderInfo.py	(revision 8028)
@@ -79,4 +79,9 @@
     pass
 
+if review_state == 'admitted':
+    info['acceptance'] = True
+else:
+    info['acceptance'] = False
+
 # end customization
 
@@ -129,5 +134,5 @@
 
     if row['is_requeryable_etranzact']:
-        row['callback_url_tranzact'] = "%(url)s/tranzact_cb" % row
+        row['callback_url_tranzact'] = "%(url)s/etranzact_cb" % row
 #        if payment.category == 'schoolfee':
 #            row['callback_url'] = "%(url)s/interswitch_cb" % row
Index: WAeUP_SRP/trunk/skins/waeup_uniben/getSchoolFee.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_uniben/getSchoolFee.py	(revision 8026)
+++ WAeUP_SRP/trunk/skins/waeup_uniben/getSchoolFee.py	(revision 8028)
@@ -586,4 +586,6 @@
     d = all_fees[brain.course]
     d['description'] = "%s (%s)" % (description,brain.course)
+else:
+    return None
     
 d['next_session_id'] = next_info['next_session_id']
Index: WAeUP_SRP/trunk/skins/waeup_uniben/pay_etranzact.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_uniben/pay_etranzact.py	(revision 8026)
+++ WAeUP_SRP/trunk/skins/waeup_uniben/pay_etranzact.py	(revision 8028)
@@ -36,4 +36,5 @@
 #amount,description = context.getSchoolFee(student_record.faculty,student_record.session,student_record.course)
 info = {}
+info['action'] = 'pay_etranzact'
 info['student'] = student_record
 info['payment_possible'] = False
Index: WAeUP_SRP/trunk/skins/waeup_uniben/pay_etranzact_accept.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_uniben/pay_etranzact_accept.py	(revision 8028)
+++ WAeUP_SRP/trunk/skins/waeup_uniben/pay_etranzact_accept.py	(revision 8028)
@@ -0,0 +1,92 @@
+##Script (Python) "pay_online"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+pay online
+"""
+from urllib import urlencode
+import logging
+logger = logging.getLogger('Skins.pay_etranzact_accept')
+import DateTime
+
+if context.portal_membership.isAnonymousUser():
+    return None
+
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+request = context.REQUEST
+wftool = context.portal_workflow
+students = context.portal_url.getPortalObject().campus.students
+
+
+student_id = context.getStudentId()
+student = getattr(students,student_id)
+
+student_record = context.students_catalog.getRecordByKey(student_id)
+#amount,description = context.getSchoolFee(student_record.faculty,student_record.session,student_record.course)
+info = {}
+info['action'] = 'pay_etranzact_accept'
+info['student'] = student_record
+info['payment_possible'] = False
+info['amount'] = '0'
+info['bank'] = ''
+info['type_description'] = ''
+info['pay_bill_to'] = ''
+
+amount = info['amount'] = 34000
+
+
+info['surcharge'] = '0'  # Uniben doesn't show the surcharge on the slip
+info['payment_possible'] = True
+info['type_description'] = 'Acceptance Fee'
+info['pay_bill_to'] = student_record.name
+info['pay_ship_to'] = "University of Benin"
+info['student_id'] = student_id
+info['student_name'] = student_record.name
+info['student_email'] = student_record.email
+#info['session_id'] = student_record.session   # this holds only for new students und must be replaced when also previous session students will pay online !!!!!!
+info['session_id'] = student_record.session
+info['type'] = 'etranzact'
+info['status'] = 'started'
+info['item'] = student_record.course
+info['category'] = 'acceptance'
+now = DateTime.DateTime()
+info['date'] = now
+timestamp = "%d" % int(now.timeTime()*1000)
+info['order_id'] = "%s%s" % (student_id[1:],timestamp)
+p_id = "p%s" % timestamp
+
+if student_id is None:
+    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+if "payments" not in student.objectIds():
+    student.invokeFactory('PaymentsFolder','payments')
+    payments = getattr(student,'payments')
+    d = {}
+    d['Title'] = 'Payments'
+    payments.getContent().edit(mapping=d)
+    wftool.doActionFor(payments,'open')
+else:
+    payments = getattr(student,'payments')
+if request.has_key('epayment'):
+    return context.etranzact_form(info=info)
+
+payments.invokeFactory('Payment', p_id)
+payment = getattr(payments,p_id)
+wftool.doActionFor(payment,'open')
+d = {}
+d.update(info)
+payment.getContent().edit(mapping=d)
+logger.info('%(student_id)s initiated eTranzact acceptance fee payment with order_id %(order_id)s' % info)
+
+return context.payments_view()
Index: WAeUP_SRP/trunk/skins/waeup_uniben/payments_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_uniben/payments_view.pt	(revision 8026)
+++ WAeUP_SRP/trunk/skins/waeup_uniben/payments_view.pt	(revision 8028)
@@ -74,4 +74,15 @@
         <br />
         <div>
+
+          <form tal:condition="info/acceptance|nothing"
+                tal:attributes="action string: ${context/absolute_url}/pay_etranzact_accept" method="post" class="group">
+            <input type="submit" name="epayment"
+                   class="context"
+                   value="Initiate Acceptance Fee Payment (eTranzact)"
+                   />
+            <br /><br />
+            <font tal:condition="python:False" color='red'>Surcharge for Late Registration is 10000 Naira. </font>
+          </form>
+
           <form tal:condition="python: info.get('payment_method') in ('online_payment','both_payments')" 
                 tal:attributes="action string: ${context/absolute_url}/pay_interswitch" method="post" class="group">
Index: WAeUP_SRP/trunk/skins/waeup_uniben/tranzact_cb.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_uniben/tranzact_cb.py	(revision 8026)
+++ 	(revision )
@@ -1,193 +1,0 @@
-## Script (Python) "tranzact_cb"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=
-##title=
-##
-# $Id$
-"""
-payment callback
-"""
-import logging
-logger = logging.getLogger('Skins.etranzact_cb')
-from AccessControl import Unauthorized
-import DateTime
-
-if context.portal_membership.isAnonymousUser():
-    return None
-
-request = context.REQUEST
-students = context.portal_url.getPortalObject().campus.students
-wftool = context.portal_workflow
-mtool = context.portal_membership
-member = mtool.getAuthenticatedMember()
-member_id = str(member)
-#student_id = context.getStudentId()
-access_info = context.waeup_tool.getAccessInfo(context)
-student_id = access_info['student_id']
-if not context.isSectionOfficer() and (student_id is None or student_id != member_id):
-    logger.info('%s tried to access payment object of %s' % (member_id,student_id))
-    referer = request.get('HTTP_REFERER','none')
-    logger.info('%s:%s illegal access, referer = %s' % (member_id,student_id,referer))
-    real_ip = request.get('HTTP_X_REAL_IP',"none")
-    logger.info('%s:%s illegal access, real_x_ip = %s' % (member_id,student_id,real_ip))
-    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
-
-referer = request.get('HTTP_REFERER','none')
-real_ip = request.get('HTTP_X_REAL_IP',"none")
-logger.info('%s, callback referer = %s, IP = %s' % (student_id,referer,real_ip))
-
-ontest = True
-
-if not ontest and not 'webpay.interswitchng.com' in referer and not 'waeup.org' in referer:
-    logger.info('%s, wrong callback referer %s, callback rejected, IP = %s' % (student_id,referer,real_ip))
-    return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
-
-student = getattr(students,student_id)
-
-success = request.get('SUCCESS')
-
-logger.info('SUCCESS: %s' % success)
-
-if success == '-1':
-    logger.info('%s requeried payment %s for %s without success' % (member,context.getId(),student_id))
-    return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
-
-
-# Example:
-#'RECEIPT_NO=5001109085339
-#&PAYMENT_CODE=500856521315472785095
-#&MERCHANT_CODE=0570019903
-#&TRANS_AMOUNT=5000.0
-#&TRANS_DATE=2011/09/08 10:06:31
-#&TRANS_DESCR=Trade%20-%20Tel%20line%20installation%20EO20474-Obinna%20Mbagwu
-#&CUSTOMER_ID=EO20474
-#&BANK_CODE=500
-#&BRANCH_CODE=001
-#&SERVICE_ID=EO20474
-#&CUSTOMER_NAME=Obinna%20Mbagwu
-#&CUSTOMER_ADDRESS=No%207%20Park%20View%20Estate%20Ikoyi
-#&TELLER_ID=etzbankteller
-#&USERNAME=N/A
-#&PASSWORD=N/A
-#&BANK_NAME=eTranzact%20Test%20Bank
-#&BRANCH_NAME=ETZ%20BANK%20HEAD%20OFFICE
-#&CHANNEL_NAME=Bank
-#&PAYMENT_METHOD_NAME=Cash
-#&PAYMENT_CURRENCY=566
-#&TRANS_TYPE=002
-#&TRANS_FEE=0.0
-#&TYPE_NAME=Trade%20-%20Tel%20line%20installation
-#&LEAD_BANK_CODE=057
-#&LEAD_BANK_NAME=eTranzact%20Test%20Bank'
-
-
-success = request.get('SUCCESS').split('&')
-success_dict = dict([tuple(i.split('=')) for i in success])
-
-pay_doc = context.getContent()
-
-if pay_doc['order_id'] != success_dict['PAYMENT_CODE']:
-    logger.info('%s requeried payment %s for %s but wrong payment code %s returned' % (member,context.getId(),student_id,success_dict['PAYMENT_CODE']))
-    return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
-
-if pay_doc['amount'] != success_dict['TRANS_AMOUNT']:
-    logger.info('%s requeried payment %s for %s but wrong amount %s returned' % (member,context.getId(),student_id,success_dict['TRANS_AMOUNT']))
-    return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
-
-pd = {}
-pd['resp_desc'] = success_dict['TRANS_DESCR'].replace('%20',' ')
-pd['resp_pay_reference'] = success_dict['RECEIPT_NO']
-pd['resp_code'] = 'ET'
-pd['resp_approved_amount'] = success_dict['TRANS_AMOUNT']
-pd['status'] = 'paid'
-
-pay_doc.edit(mapping = pd)
-
-s_brain = context.students_catalog(id=student_id)[0]
-session = s_brain.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']
-next_verdict = next_info['next_verdict']
-next_previous_verdict = next_info['next_previous_verdict']
-if pay_doc.category == 'schoolfee':
-    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)
-
-
-elif pay_doc.category == 'hostel_maintenance':
-
-    ## callback function for accommodation_catalog method
-    data={}
-    data['acco_maint_date'] = pay_doc.date
-    data['catkey'] =student_id + '|' + pay_doc.session_id
-    data['acco_maint_fee'] = pay_doc.amount
-    data['acco_maint_pay_id'] = context.getId()
-    data['reservation_status'] = 'maintenance_fee_paid'
-    context.accommodation_catalog.modifyRecord(**data)
-
-    ## callback function for accommodation object method (deactivated since March 2011)
-    #acco_info = context.getAccommodationInfo()
-    #d = {}
-    #d['acco_maint_date'] = pay_doc.date
-    #d['acco_maint_fee'] = pay_doc.amount
-    #d['acco_maint_pay_id'] = context.getId()
-    #try:
-    #    acco_info['acco_doc'].edit(mapping=d)
-    #except:
-    #    logger.info('%s requeried payment though maintenance already paid' % student_id)
-    #try:
-    #    wftool.doActionFor(acco_info['acco'],'pay_maintenance_fee',dest_container=acco_info['acco'])
-    #except:
-    #    logger.info('%s no workflow action pay_maintenance_fee' % student_id)
-
-elif pay_doc.category == 'acceptance':
-    if context.getStudentReviewState() in ('admitted', 'objection_raised'):
-        logger.info('%s paid acceptance fee' % (student_id))
-        current = DateTime.DateTime()
-        wf = context.portal_workflow
-        info = context.getClearanceInfo()
-        wftool.doActionFor(student,'enter_clearance_pin')
-        context.waeup_tool.changeWorkflowState(info['clear'], 'opened')
-        context.waeup_tool.changeWorkflowState(info['app'], 'closed')
-        dc = {}
-        app_doc = info['app_doc']
-        #dc['clr_ac_pin'] = pay_doc.order_id
-        dc['clr_ac_date'] = current
-        dc['entry_date'] = current
-        info['clear_doc'].edit(mapping = dc)
-        if info['penalty']:
-            logger.info('%s started late clearance' % (info['id']))
-        #return redirect("%s/clearance_edit_form" % info['clear'].absolute_url())
-
-logger.info('%s received valid callback' % student_id)
-
-#review_state = wftool.getInfoFor(context,'review_state',None)
-#if review_state == 'opened':
-#    wftool.doActionFor(context,'close')
-context.waeup_tool.changeWorkflowState(context, 'closed')
-
-return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
