Index: WAeUP_SRP/trunk/skins/waeup_futminna/getInterswitchParams.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_futminna/getInterswitchParams.py	(revision 5598)
+++ WAeUP_SRP/trunk/skins/waeup_futminna/getInterswitchParams.py	(revision 5599)
@@ -28,4 +28,6 @@
 else:
     d['action'] = "https://webpay.interswitchng.com/paydirect/webpay/pay.aspx"
+
+
 if paytype in ("HOM",):
     d['callback_function'] = 'interswitch_cb'
@@ -39,9 +41,20 @@
     d['category'] = 'hostel_maintenance'
     d['item'] = paytype
-    #d['payment_params'] = 'college_split'
-    d['payment_params'] = '0'
+    
+    #Adding xml split data
+    d['payment_params'] = 'college_split'
+    xmldict = {}
+    xmldict['detail_ref'] = student_record.id
+    xmldict['department'] = student_record.department
+    xmldict['faculty'] = student_record.faculty
+    xmldict['fut_amount'] = "%s" % d['amount']
+    
+    xmltext = """<payment_item_detail>
+    <item_details detail_ref="%(detail_ref)s" college="Federal University of Technology Minna" department="%(department)s" faculty="%(faculty)s">
+    <item_detail item_id="1" item_name="Hostel Maintenance Fee" item_amt="%(fut_amount)s" bank_id="101" acct_num="0591301005175" />
+    </item_details>
+    </payment_item_detail>""" % xmldict
+    
+    d['xml_data'] = xmltext    
 
 return d
-
-
-
Index: WAeUP_SRP/trunk/skins/waeup_futminna/goto_interswitch_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_futminna/goto_interswitch_form.pt	(revision 5598)
+++ WAeUP_SRP/trunk/skins/waeup_futminna/goto_interswitch_form.pt	(revision 5599)
@@ -12,6 +12,4 @@
           <input type="hidden" tal:attributes="name python:arg[0];value python:arg[1]" />
       </span>          
-      
-      <span tal:replace = "structure info/xml_data" /> 
       
         <table>
Index: WAeUP_SRP/trunk/skins/waeup_futminna/pay_interswitch_acco.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_futminna/pay_interswitch_acco.py	(revision 5599)
+++ WAeUP_SRP/trunk/skins/waeup_futminna/pay_interswitch_acco.py	(revision 5599)
@@ -0,0 +1,107 @@
+## Script (Python) "pay_interswitch_acco"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=paytype=None
+##title=
+##
+# $Id$
+"""
+pay online
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+from urllib import urlencode
+import logging
+logger = logging.getLogger('Skins.pay_interswitch_acco')
+import DateTime
+
+if context.portal_membership.isAnonymousUser():
+    return None
+
+request = context.REQUEST
+wftool = context.portal_workflow
+students = context.portal_url.getPortalObject().campus.students
+
+student_id = context.getStudentId()
+if student_id is None:
+    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+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)
+now = DateTime.DateTime()
+timestamp = "%d" % int(now.timeTime()*1000)
+payment_id = "p%s" % timestamp
+hostel = paytype == "HOM"
+if hostel:
+    info = context.getInterswitchParams(paytype,student,payment_id,student_record)
+    info['student'] = student_record
+else:
+    return None
+
+info['pay_bill_to'] = student_record.name
+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
+info['order_id'] = "%s%s" % (student_id[1:],timestamp)
+
+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(info=info)
+
+
+payments.invokeFactory('Payment', payment_id)
+payment = getattr(payments,payment_id)
+wftool.doActionFor(payment,'open')
+d = {}
+d.update(info)
+payment.getContent().edit(mapping=d)
+#wftool.doActionFor(payment,'close')
+#wftool.doActionFor(student,'pay_school_fee')
+info['callback_url'] = "%s/payments/%s/%s?echo=%s" % (student.absolute_url(),
+                                                      payment_id,
+                                                      info['callback_function'],
+                                                      payment_id)
+
+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'),
+                  ('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'),
+                  ('pay_item_id','pay_item_id'),
+                  ('pay_item_name','pay_item_name'),
+                  ('payment_params','payment_params'),
+                  ('xml_data','xml_data'),
+                  )
+args = {}
+for arg,field in payment_fields:
+    args[arg] = info[field]
+interswitch_amount = int(info['surcharge'])*100
+uni_amount = int(info['amount'])*100
+total_amount = interswitch_amount + uni_amount
+args['Amount'] = "%d" % (total_amount)
+args['cust_name_desc'] = "Student Name"
+#args['xml_data'] = info['xml_data'] =''
+info['args'] = args
+return context.goto_interswitch_form(info=info)
