Index: WAeUP_SRP/base/Payment.py
===================================================================
--- WAeUP_SRP/base/Payment.py	(revision 2890)
+++ WAeUP_SRP/base/Payment.py	(revision 2891)
@@ -43,5 +43,5 @@
             d['key'] = payment.getId()
             d['amount'] = doc.amount
-            d['description'] = d['type_description'] = doc.type_description
+            d['type_description'] = doc.type_description
             subject = ''
             if doc.type_description.startswith('School'):
@@ -55,5 +55,5 @@
                     p_status = "paid"
                     break
-                if doc.resp_code in ("00","IP"):
+                if doc.resp_code in ("00","IP","AP"):
                     p_type = "online"
                     p_status = "paid"
@@ -64,5 +64,5 @@
             d['key'] = payment.getId()
             d['type'] = p_type  # scratch card
-            d['target'] = student_record.course
+            d['item'] = student_record.course
             d['status'] = p_status
             d['resp_approved_amount'] = getattr(doc,'resp_approved_amount',None)
@@ -73,8 +73,8 @@
             d['resp_card_num'] = doc.resp_card_num
             d['date'] = getattr(doc,'date',None)
-            d['resp_date'] = getattr(doc,'resp_date',None)
+            #d['resp_date'] = getattr(doc,'resp_date',None)
             # msg = " ".join(["%s: %s" % (key,value) for key,value in d.items()])
             # logger.info(msg)
-            
+
             review_state = wftool.getInfoFor(payment,'review_state',None)
             if review_state == "closed":
Index: WAeUP_SRP/base/skins/waeup_epayment/interswitch_acco_cb.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/interswitch_acco_cb.py	(revision 2890)
+++ WAeUP_SRP/base/skins/waeup_epayment/interswitch_acco_cb.py	(revision 2891)
@@ -53,9 +53,19 @@
 for rc,pdk in resp_codes:
     pd[pdk] = request.get(rc,'')
+    
+    
+## for testing purposes
+pd['resp_desc'] = 'Simulated Callback'
+pd['resp_pay_reference'] = 'XXXX'
+pd['resp_code'] = '00'
+pd['resp_card_num'] = '0000'
+pd['resp_approved_amount'] = '10000'    
 
 if pd['resp_code'] == '00' and len(pd['resp_approved_amount']) > 4:
     pd['resp_approved_amount'] = pd['resp_approved_amount'][:-2]
+    pd['status'] = 'paid'
 else:
     pd['resp_approved_amount'] = '0'
+    pd['status'] = 'failed'    
 
 review_state = wftool.getInfoFor(context,'review_state',None)
@@ -86,4 +96,9 @@
     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)       
     try:
         wftool.doActionFor(acco_info['acco'],'pay_maintenance_fee',dest_container=acco_info['acco'])
@@ -92,6 +107,7 @@
         logger.info('%s no workflow action pay_maintainance_fee' % student_id)
         return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
-    
-else:        
+ 
+
+else:
     next_info = context.getNextInfo(s_brain)
     next_session_id = next_info['next_session_id']
@@ -101,5 +117,5 @@
     next_verdict = next_info['next_verdict']
     next_previous_verdict = next_info['next_previous_verdict']
-    
+
     if  resp == '00':
         if context.getStudentReviewState() == "school_fee_paid":
@@ -121,5 +137,5 @@
             if next_transition:
                 wftool.doActionFor(student,next_transition)
-    
+
         logger.info('%s received valid callback' % student_id)
         referer = request.get('HTTP_REFERER','none')
@@ -133,4 +149,4 @@
     except:
         logger.info('%s no workflow action close' % student_id)
-    
 
+
Index: WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py	(revision 2890)
+++ WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py	(revision 2891)
@@ -106,6 +106,6 @@
     info['status'] = 'paid'
     info['session_id'] = student_record.session
-    info['target'] = student_record.course
-    info['subject'] = 'schoolfee'
+    info['item'] = student_record.course
+    info['category'] = 'schoolfee'
     info['resp_code'] = "SC"
     info['resp_desc'] = "SC Payment Successful"
Index: WAeUP_SRP/base/skins/waeup_epayment/pay_interswitch_acco.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/pay_interswitch_acco.py	(revision 2890)
+++ WAeUP_SRP/base/skins/waeup_epayment/pay_interswitch_acco.py	(revision 2891)
@@ -19,5 +19,5 @@
 from urllib import urlencode
 import logging
-logger = logging.getLogger('Skins.pay_interswitch')
+logger = logging.getLogger('Skins.pay_interswitch_acco')
 import DateTime
 
@@ -75,4 +75,5 @@
 info['student_id'] = student_id
 info['student_name'] = student_record.name
+info['session_id'] = student_record.session
 info['student_email'] = student_record.email
 info['date'] = now
@@ -105,5 +106,5 @@
                                                       payment_id)
 
-logger.info('%(student_id)s initiated %(description)s payment with order_id %(order_id)s and callback url %(callback_url)s' % info)
+logger.info('%(student_id)s initiated %(type_description)s payment with order_id %(order_id)s and callback url %(callback_url)s' % info)
 payment_fields = (('product_id','site_id'),
                   ('site_name','site_name'),
Index: WAeUP_SRP/base/skins/waeup_epayment/payment_receipt.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/payment_receipt.pt	(revision 2890)
+++ WAeUP_SRP/base/skins/waeup_epayment/payment_receipt.pt	(revision 2891)
@@ -20,5 +20,5 @@
         </tr>        
         <tr>
-          <td>JAMB Registration Number:</td>
+          <td>Registration Number:</td>
           <td tal:content="student/jamb_reg_no" />
         </tr>           
Index: WAeUP_SRP/base/skins/waeup_epayment/simulate_callback.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/simulate_callback.py	(revision 2890)
+++ WAeUP_SRP/base/skins/waeup_epayment/simulate_callback.py	(revision 2891)
@@ -13,5 +13,5 @@
 current = DateTime.DateTime()
 pr = context.portal_registration
-logger = logging.getLogger('EPayment.Simulate')
+logger = logging.getLogger('Skins.simulate_callback')
 
 args = {}
@@ -24,5 +24,5 @@
 #set_trace()
 #url = "%s" % (context.absolute_url())
-raw_url = REQUEST.get("site_redirect_url") 
+raw_url = REQUEST.get("site_redirect_url")
 url = "%s&%s" % (raw_url,urlencode(args))
 return REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/base/skins/waeup_layout/layout_student_acco_edit.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_layout/layout_student_acco_edit.pt	(revision 2890)
+++ WAeUP_SRP/base/skins/waeup_layout/layout_student_acco_edit.pt	(revision 2891)
@@ -16,4 +16,10 @@
   apply request/apply_button|nothing;
   widgets python:context.getRenderedWidgets(layout);
+  info python: context.getAccommodationInfo();
+  maintenance_online info/online_payment|nothing;
+  
+  
+  
+  
   ">
   <form action="" id="editForm" method="post" 
@@ -44,7 +50,4 @@
                      tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
             </div>
-            <button type="button" class="tooltipControl"
-                    tal:condition="widget/help"
-                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
             </td>
             <td>
@@ -52,18 +55,4 @@
               <div tal:replace="structure cell/widget_rendered"/>
             </span>
-            <div class="tooltipArea" style="visibility: hidden;"
-                 tal:condition="widget/help"
-                 tal:attributes="id tooltip_id;
-                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
-                 >
-              <tal:block tal:content="widget/help">This is the help for this field
-              </tal:block>
-            </div>
-            <tal:block condition="err">
-              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
-                <br /><em style="color: red"
-                          tal:content="msg">err</em>
-              </tal:block>
-            </tal:block>
             </td>
           </div>
@@ -91,7 +80,4 @@
                      tal:attributes="for cell/widget_input_area_id|nothing;">label</label>:
             </div>
-            <button type="button" class="tooltipControl"
-                    tal:condition="widget/help"
-                    tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
           </td>
           <td>
@@ -99,18 +85,4 @@
               <div tal:replace="structure cell/widget_rendered"/>
             </span>
-            <div class="tooltipArea" style="visibility: hidden;"
-                 tal:condition="widget/help"
-                 tal:attributes="id tooltip_id;
-                 onclick python:'showElement(false, \'%s\')' % tooltip_id;"
-                 >
-              <tal:block tal:content="widget/help">This is the help for this field
-              </tal:block>
-            </div>
-            <tal:block condition="err">
-              <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
-                <br /><em style="color: red"
-                          tal:content="msg">err</em>
-              </tal:block>
-            </tal:block>
           </td>
         </div>
@@ -122,16 +94,5 @@
          value="Save" 
          id="cpsdocument_edit_button"
-         tal:condition="not:creation" />
-  <input type="submit" class="standalone" name="apply_admission"
-         value="apply for admission"
-         id="cpsdocument_edit_and_view_button"
-         tal:condition="apply" 
-         tal:attributes="value apply"/>
-  <input type="submit" 
-         class="standalone" 
-         name="cpsdocument_create_button"
-         value="apply"
-         tal:attributes="value options/button"
-         tal:condition="creation" />
+         tal:condition="python:not creation and not maintenance_online" />
 
 </form>
Index: WAeUP_SRP/base/skins/waeup_student/accommodation_edit_form.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/accommodation_edit_form.pt	(revision 2890)
+++ WAeUP_SRP/base/skins/waeup_student/accommodation_edit_form.pt	(revision 2891)
@@ -3,5 +3,7 @@
                    data_storage options/ds|nothing;
                    mode options/mode;
-                   edition python:1;"
+                   edition python:1;
+                   info python: context.getAccommodationInfo();
+                   maintenance_online info/online_payment|nothing"
                    >
 <metal:block define-macro="edit_form">
@@ -27,21 +29,24 @@
         <br />
         <div tal:replace="structure rendered_main" />
-          <p>Instructions :</p>
-        <ul tal:condition="python: mode == 'create'">
-            <li>Buy a Hostel Application Scratch Card.</li> 
+        
+        <p tal:condition="not: maintenance_online">Instructions :</p>
+        
+        <ul tal:condition="python: mode == 'create' and not maintenance_online">
+                  <li>Buy a Hostel Application Scratch Card.</li> 
             <li>Enter the PIN above and press 'Book'.</li>
             <li>Print your Hostel Allocation Slip.</li>
-          </ul>
-        <tal:block condition="python: mode == 'edit'" 
-                   tal:define="info python: context.getAccommodationInfo();
-                   maintenance_online info/online_payment|nothing"
-                   >
-          <ul tal:condition="not: maintenance_online" tal:omit-tag="">
-            <li>Buy a Hostel Maintainance Scratch Card 
-              (Code: <span tal:replace="python: info['acco_doc'].acco_maint_code" />) for 
-              <span tal:replace="python: info['acco_doc'].acco_maint_fee" /> Nairas</li> 
-            <li>Enter the PIN above and press 'Save'.</li>
-            <li>Print your Hostel Maintenance Receipt.</li>
-          </ul>
+        </ul>
+ 
+        <tal:block condition="python: mode == 'edit'" >
+ 
+           <ul tal:condition="not: maintenance_online" tal:omit-tag="">
+             <li>Buy a Hostel Maintainance Scratch Card 
+               (Code: <span tal:replace="python: info['acco_doc'].acco_maint_code" />) for 
+               <span tal:replace="python: info['acco_doc'].acco_maint_fee" /> Nairas</li> 
+             <li>Enter the PIN above and press 'Save'.</li>
+             <li>Print your Hostel Maintenance Receipt.</li>
+           </ul>
+          
+        
           <tal:block condition="maintenance_online">
             <table tal:condition="not: info/maintenance_paid">
