Index: /WAeUP_SRP/uniben/waeup_custom/pay_interswitch.py
===================================================================
--- /WAeUP_SRP/uniben/waeup_custom/pay_interswitch.py	(revision 2881)
+++ /WAeUP_SRP/uniben/waeup_custom/pay_interswitch.py	(revision 2882)
@@ -33,8 +33,8 @@
 student = getattr(students,student_id)
 
-sbrain = context.students_catalog(id=student_id)[0]
-#amount,description = context.getSchoolFee(sbrain.faculty,sbrain.session,sbrain.course)
+student_record = context.students_catalog.getRecordByKey(student_id)
+#amount,description = context.getSchoolFee(student_record.faculty,student_record.session,student_record.course)
 info = {}
-info['student'] = sbrain
+info['student'] = student_record
 info['payment_possible'] = False
 info['amount'] = '0'
@@ -42,8 +42,8 @@
 info['type_description'] = ''
 info['pay_bill_to'] = ''
-fee_dict = context.getSchoolFee(sbrain)
-fulltime = sbrain.mode.endswith('_ft')
-new = sbrain.review_state == 'cleared_and_validated'
-returning = sbrain.review_state == 'returning'
+fee_dict = context.getSchoolFee(student_record)
+fulltime = student_record.mode.endswith('_ft')
+new = student_record.review_state == 'cleared_and_validated'
+returning = student_record.review_state == 'returning'
 if not fee_dict or (not new and fulltime) or not (new or returning):
     return context.interswitch_form(info=info)
@@ -56,20 +56,21 @@
 if fulltime:
     pay_item_id = "6100"
-    #info['type_code'] = sbrain.faculty   #type_code is redundant and will be removed soon
+    #info['type_code'] = student_record.faculty   #type_code is redundant and will be removed soon
     info['bank'] = ''
 else:
     pay_item_id = "6101"
-    #info['type_code'] = sbrain.course  #type_code is redundant and will be removed soon
+    #info['type_code'] = student_record.course  #type_code is redundant and will be removed soon
     info['bank'] = ''
 info['payment_possible'] = True
 info['type_description'] = fee_dict['description']
-info['pay_bill_to'] = sbrain.name
+info['pay_bill_to'] = student_record.name
 info['pay_ship_to'] = "University of Benin"
 info['student_id'] = student_id
-info['student_name'] = sbrain.name
-info['student_email'] = sbrain.email
+info['student_name'] = student_record.name
+info['student_email'] = student_record.email
+info['session_id'] = student_record.session
 info['type'] = 'online'
 info['status'] = 'started'
-info['target'] = sbrain.course
+info['target'] = student_record.course
 info['subject'] = 'schoolfee'
 now = DateTime.DateTime()
@@ -138,6 +139,6 @@
 xmldict = {}
 xmldict['detail_ref'] = args['txn_ref']
-xmldict['department'] = sbrain.department
-xmldict['faculty'] = sbrain.faculty
+xmldict['department'] = student_record.department
+xmldict['faculty'] = student_record.faculty
 #xmldict['wema_amt'] = "%d" % wema_amount
 #xmldict['provider_amt'] = "%d" % provider_amount
