Index: /WAeUP_SRP/trunk/profiles/default/vocabularies/payment_categories.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/vocabularies/payment_categories.xml	(revision 6909)
+++ /WAeUP_SRP/trunk/profiles/default/vocabularies/payment_categories.xml	(revision 6910)
@@ -13,3 +13,4 @@
     <item key="transfer" msgid="">Transfer</item>
     <item key="gown" msgid="">Gown Hire</item>
+    <item key="acceptance" msgid="">Acceptance Fee</item>
 </object>
Index: /WAeUP_SRP/trunk/skins/waeup_epayment/interswitch_cb.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_epayment/interswitch_cb.py	(revision 6909)
+++ /WAeUP_SRP/trunk/skins/waeup_epayment/interswitch_cb.py	(revision 6910)
@@ -121,5 +121,4 @@
 next_verdict = next_info['next_verdict']
 next_previous_verdict = next_info['next_previous_verdict']
-
 if  resp == '00':
     if pay_doc.category == 'schoolfee':  
@@ -170,5 +169,22 @@
         #    logger.info('%s no workflow action pay_maintenance_fee' % student_id)
             
-
+    elif pay_doc.category == 'acceptance':
+        if context.getStudentReviewState() == "admitted":
+            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)
@@ -177,7 +193,8 @@
     logger.info('%s received unsuccessful callback: %s' % (student_id,pd['resp_desc']))
 
-review_state = wftool.getInfoFor(context,'review_state',None)
-if review_state == 'opened':
-    wftool.doActionFor(context,'close')
+#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_futminna/admission_form.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_futminna/admission_form.pt	(revision 6910)
+++ /WAeUP_SRP/trunk/skins/waeup_futminna/admission_form.pt	(revision 6910)
@@ -0,0 +1,94 @@
+<metal:html tal:define="info context/getStudentInfo;">
+  <span tal:condition="not: info">
+    <span tal:content="here/illegal_view" />
+  </span>
+<metal:block tal:condition="info"> 
+  <metal:body use-macro="here/main_template/macros/master">
+    <metal:main fill-slot="main">
+    <span tal:condition="not: info">
+      <span tal:content="here/illegal_view" />
+    </span>
+    <span tal:condition="info"
+          tal:define="review_state info/review_state;
+                      app_email info/app_doc/app_email|nothing;
+                      app_passport info/has_passport;
+                      data_complete python:app_passport and app_email;
+                      ">
+          
+
+      <div style="text-align: right"
+           tal:condition="python:review_state in ('admitted', 'clearance_pin_entered', 'clearance_requested', 'cleared', 'objection_raised',)">
+      <a href="" target="slip" tal:attributes="href string:admission_slip"
+          onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+          <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+          Admission Slip
+      </a>
+      </div>          
+  
+          
+      <h3>This is to inform you that you have been provisionally admitted into 
+      <span tal:replace="here/portal_properties/institution_title" /> as follows:
+      </h3>
+
+      <br />
+      <span tal:omit-tag=""
+            tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'],
+            layout_mode='view_info', 
+            layout_id='student_application')" 
+            />
+
+      <h4>Your Study Course:</h4>
+      <table tal:define="sc python: info['course_doc']">
+        <tr>
+          <td width="180px">Certificate:</td> 
+          <td><span tal:content="sc/title" /></td>
+        </tr>
+        <tr>
+          <td>Certificate ID:</td>
+          <td tal:content="sc/study_course" />
+        </tr>
+          <span tal:define="f_id sc/faculty;
+          d_id sc/department;
+          f_title context/academics/?f_id/Title|string:Faculty not yet in Prospectus;
+          d_title context/academics/?f_id/?d_id/Title|string:Department not yet in Prospectus"
+          >
+            <tr>
+              <td>Faculty:</td>
+              <td tal:content="f_title" />
+            </tr>
+            <tr>
+              <td>Department:</td> 
+              <td><span tal:content="d_title" /></td>
+            </tr>
+          </span>
+        </table>        
+        
+        <br />
+        
+      <strong tal:condition="python: False and 'pt' in info['app_doc'].entry_mode "></strong>
+      <strong tal:condition="python: False and 'ft' in info['app_doc'].entry_mode ">Clearance commences on resumption and ends exactly two(2) weeks after resumption date.
+              Any breach of this directive will result in forfeiture of the admission offer.</strong>           
+              
+      <br /><br />      
+  
+     
+      <form action="." method="post" class="group">
+
+                <input  tal:condition="python:review_state=='admitted'" type="submit" name="raise_objection:method" value="Raise an Objection"
+                       class="destructive"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       (cpsmcat('Confirm that you want to raise an objection.'), )" 
+                       />
+                <input tal:condition="python:review_state in ('admitted', 'objection_raised',) and not data_complete" type="submit" name="application_edit:method"
+                       class="context" value="Continue" 
+                       />
+                <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>
+    </span>
+    After Acceptance Fee Payment click 'Clearance started' and fill your Clearance Form.
+    </metal:main>
+  </metal:body>
+</metal:block>     
+</metal:html>
Index: /WAeUP_SRP/trunk/skins/waeup_futminna/getPaymentsFolderInfo.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_futminna/getPaymentsFolderInfo.py	(revision 6909)
+++ /WAeUP_SRP/trunk/skins/waeup_futminna/getPaymentsFolderInfo.py	(revision 6910)
@@ -68,4 +68,9 @@
 info['prod_id'] = '117'
 
+if review_state == 'admitted':
+    info['acceptance'] = True
+else:
+    info['acceptance'] = False
+
 if payment_disabled:
     info['payment_method'] = ""
Index: /WAeUP_SRP/trunk/skins/waeup_futminna/interswitch_form_accept.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_futminna/interswitch_form_accept.pt	(revision 6910)
+++ /WAeUP_SRP/trunk/skins/waeup_futminna/interswitch_form_accept.pt	(revision 6910)
@@ -0,0 +1,53 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:main fill-slot="main"
+              tal:define="info options/info">
+    <h3>Confirm Your Payment Data! </h3>
+    <br />
+    <span tal:condition="not: info/payment_possible">
+      No payment information for your course available.
+    </span>
+    <span tal:condition="info/payment_possible">
+      <form method="post" action="pay_interswitch_accept">
+        <table>
+          <tr>
+            <td width="100px">
+            Payment:</td>
+            <td tal:content="info/type_description"></td>
+          </tr>
+          <tr>
+            <td>
+            Name:
+            </td>
+            <td tal:content="info/pay_bill_to" />
+          </tr>              
+          <tr tal:condition="info/fee|nothing">
+            <td>
+            Fee:
+            </td>
+            <td> Naira <span tal:content="info/fee" /></td>
+          </tr>           
+          <tr tal:condition="info/lrf|nothing">
+            <td width="200px">
+            Late Registration Fee:
+            </td>
+            <td> Naira <span tal:content="info/lrf" /></td>
+          </tr>
+          <tr>
+            <td >
+            Total Amount:
+            </td>
+            <td> Naira <span tal:content="info/amount" /></td>
+          </tr>
+        </table>
+        <br />
+        <input type="submit" 
+               class="standalone" 
+               name="goto_bank" 
+               value="Confirm" 
+               />
+
+      </form>
+    </span>
+    </metal:main>
+</metal:body>
+
Index: /WAeUP_SRP/trunk/skins/waeup_futminna/pay_interswitch_accept.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_futminna/pay_interswitch_accept.py	(revision 6910)
+++ /WAeUP_SRP/trunk/skins/waeup_futminna/pay_interswitch_accept.py	(revision 6910)
@@ -0,0 +1,151 @@
+## Script (Python) "pay_interswitch_accept"
+##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_interswitch_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)
+
+info = {}
+info['student'] = student_record
+info['payment_possible'] = False
+info['amount'] = ''
+info['bank'] = ''
+info['type_description'] = ''
+info['pay_bill_to'] = ''
+fulltime = student_record.mode.endswith('_ft')
+
+info['site_id'] = '117'
+info['currency_id'] = '566'
+info['pay_item_id'] = '11706'
+
+info['bank'] = ''
+info['payment_possible'] = True
+info['type_description'] = 'Acceptance Fee'
+info['pay_bill_to'] = student_record.name
+info['student_id'] = student_id
+info['student_name'] = student_record.name
+info['type'] = 'online'
+info['status'] = 'started'
+info['session_id'] = student_record.session
+info['item'] = student_record.course
+info['category'] = 'acceptance'
+info['student_email'] = student_record.email
+now = DateTime.DateTime()
+info['date'] = now
+info['pay_ship_to'] = "Federal University of Technology, Minna, Nigeria"
+timestamp = "%d" % int(now.timeTime()*1000)
+info['order_id'] = "%s%s" % (student_id[1:],timestamp)
+p_id = "p%s" % timestamp
+
+
+info['surcharge'] = 300
+info['acceptance_fee'] = 20000
+info['amount'] = amount = info['acceptance_fee'] + info['surcharge']
+total_amount = 100*int(amount)
+
+if student_id is None:
+    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+if not student_record.review_state == 'admitted':
+    return 'not allowed'
+
+info['action'] = "https://webpay.interswitchng.com/paydirect/webpay/pay.aspx"
+
+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.interswitch_form_accept(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)
+
+info['callback_url'] = "%s/payments/%s/interswitch_cb?echo=%s" % (student.absolute_url(),
+                                                                  p_id,
+                                                                  p_id)
+
+logger.info('%(student_id)s initiated acceptance fee payment with order_id %(order_id)s and callback url %(callback_url)s' % info)
+payment_fields = (('product_id','site_id'),
+                  ('site_redirect_url','callback_url'),
+                  ('Currency','currency_id'),
+                  ('cust_id','student_id'),
+                  ('cust_id_desc','type_description'),
+                  ('cust_name','student_name'),
+                  ('txn_ref','order_id'),
+                  ('Amount','amount'),
+                  )
+args = {}
+for arg,field in payment_fields:
+    args[arg] = info[field]
+
+
+interswitch_amount = 300
+fut_amount = amount - interswitch_amount
+
+xmldict = {}
+xmldict['detail_ref'] = args['txn_ref']
+xmldict['department'] = student_record.department
+xmldict['level'] = student_record.level
+xmldict['faculty'] = student_record.faculty
+xmldict['fut_amount'] = "%d" % int(100*fut_amount)
+
+
+xmltext = """<payment_item_detail>
+<item_details detail_ref="%(detail_ref)s" college="FUT Minna" department="%(department)s" faculty="%(faculty)s">
+<item_detail item_id="1" item_name="FUT Minna Acceptance Fee" item_amt="%(fut_amount)s" bank_id="120" acct_num="1750005063" />
+</item_details>
+</payment_item_detail>""" % xmldict
+
+info['xml_data'] = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
+
+args['Amount'] = "%d" % (total_amount)
+args['site_name'] = "futminna.waeup.org"
+args['cust_name_desc'] = "Student Name"
+args['pay_item_id'] = info['pay_item_id']
+args['pay_item_name'] = "FUT Minna Acceptance Fee Payments"
+args['payment_params'] = 'college_split'
+#args['xml_data'] = ''
+#args['xml_data'] = xmltext   # info['xml_data']can be used instead
+info['args'] = args
+
+return context.goto_interswitch_form(info=info)
Index: /WAeUP_SRP/trunk/skins/waeup_futminna/payments_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_futminna/payments_view.pt	(revision 6909)
+++ /WAeUP_SRP/trunk/skins/waeup_futminna/payments_view.pt	(revision 6910)
@@ -87,4 +87,14 @@
                    />
           </form>    
+
+          <form tal:condition="info/acceptance|nothing"
+                tal:attributes="action string: ${context/absolute_url}/pay_interswitch_accept" method="post" class="group">
+            <input type="submit" name="epayment"
+                   class="context"
+                   value="Initiate Acceptance Fee Payment"
+                   />
+            <br /><br />
+            <font tal:condition="python:False" color='red'>Surcharge for Late Registration is 10000 Naira. </font>
+          </form>
           
           <form tal:condition="info/gown|nothing" 
