Index: WAeUP_SRP/base/skins/waeup_epayment/getNextInfo.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/getNextInfo.py	(revision 2828)
+++ 	(revision )
@@ -1,62 +1,0 @@
-## Script (Python) "getNextInfo"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=student_brain
-##title=
-##
-# $Id: getNextInfo.py 2678 2007-11-16 13:41:44Z henrik $
-"""
-return the students next info
-"""
-try:
-    from Products.zdb import set_trace
-except:
-    def set_trace():
-        pass
-
-info = {}
-
-reasons = ''
-
-session_id = student_brain.session
-level_id = student_brain.level
-review_state = student_brain.review_state
-verdict = student_brain.verdict
-
-has_verdict = verdict and verdict != 'N/A'
-has_session = session_id and session_id != 'N/A'
-has_level = level_id and level_id != 'N/A'
-
-info['next_transition'] = None
-info['next_session_id'] = next_session_id = session_id
-info['next_level_id'] = next_level_id = level_id
-info['next_verdict'] = verdict
-info['next_previous_verdict'] = ''
-verdicts_voc = context.portal_vocabularies.verdicts
-if review_state == 'cleared_and_validated':
-    info['next_transition'] = "pay_school_fee"
-    info['next_verdict'] = ''
-elif review_state == 'returning' and has_verdict and has_level and has_session:
-    info['next_session_id'] = next_session_id = "%02d" % (int(session_id)+1)
-    if int(session_id) > 4:
-        info['next_transition'] = "pay_school_fee"
-        info['next_verdict'] = ''
-        info['next_previous_verdict'] = verdict
-        if verdict in ('A','B',):
-            info['next_level_id'] = "%s" % (divmod(int(level_id),100)[0]*100 + 100)
-        elif verdict == 'C':
-            info['next_level_id'] = "%s" % (int(level_id) + 10)
-        else:
-            info['next_level_id'] = level_id
-    else:
-        info['next_level_id'] = "%s" % (int(level_id) + 100)
-elif review_state == 'returning' and not (has_session and has_level and has_verdict):
-    reasons = "Your data record is incomplete. School fee payment has been disabled, please contact your faculty!"
-
-info['reasons'] = reasons
-info['next_session_str'] = context.getSessionsVoc(next_session_id)
-
-return info
Index: WAeUP_SRP/base/skins/waeup_epayment/getPaymentsFolderInfo.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/getPaymentsFolderInfo.py	(revision 2828)
+++ 	(revision )
@@ -1,117 +1,0 @@
-## Script (Python) "getPaymentsFolderInfo"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=
-##title=
-##
-# $Id$
-"""
-Info for the PaymentsFolder
-"""
-
-mtool = context.portal_membership
-if mtool.isAnonymousUser():
-    return None
-try:
-    from Products.zdb import set_trace
-except:
-    def set_trace():
-        pass
-
-
-#import logging
-#logger = logging.getLogger('Skins.getPaymentsFolderInfo')
-def cmp_id(a,b):
-    s1 = "%(id)s" % a
-    s2 = "%(id)s" % b
-    if s1 == s2:
-        return 0
-    if s1 > s2:
-        return 1
-    return -1
-
-import DateTime
-request = context.REQUEST
-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)
-s_brain = context.students_catalog(id = student_id)[0]
-
-payments = []
-#from Products.zdb import set_trace;set_trace()
-
-info = {}
-is_so = info['is_so'] = context.isSectionOfficer()
-is_student = info['is_student'] = context.isStudent()
-info['student_name'] = s_brain.name
-info['query_url'] = "https://webpay.interswitchng.com/paydirect/services/TransactionQueryURL.aspx"
-review_state = info['review_state'] = s_brain.review_state
-parttime = s_brain.mode and s_brain.mode.endswith('_pt')
-fulltime = s_brain.mode and s_brain.mode.endswith('_ft')
-
-#if review_state == 'cleared_and_validated' or (parttime and review_state == 'returning'):
-#    online_payment = True
-#elif fulltime and review_state == 'returning':
-#    sc_payment = True
-
-session = s_brain.session
-next_info = context.getNextInfo(s_brain)
-info['next_session'] = next_info['next_session_id']
-info['next_session_str'] = next_info['next_session_str']
-info['payment_method'] = ""
-info['reasons'] = next_info['reasons']
-
-if review_state == 'cleared_and_validated':
-    info['payment_method'] = "online_payment"
-elif review_state == 'returning' and info['next_session'] != session:
-    info['payment_method'] = "sc_payment"
-info['prod_id'] = '61'
-
-info['student_name'] = s_brain.name
-payments_path = "%s/campus/students/%s/payments" % (context.portal_url.getPortalPath(),student_id)
-sos = context.portal_catalog(container_path=payments_path)
-info['is_so'] = is_so
-
-for so in sos:
-    row = {}
-    row['id'] = so.getId
-    row['title'] = so.Title
-    url = row['url'] = "%s/%s" % (payments_path,so.getId)
-    so_doc = context.restrictedTraverse(url,default=None).getContent()
-    row['type'] = so.portal_type
-    review_state = row['review_state'] = so.review_state
-    if so_doc.type_description.startswith('School Fee'):
-        row['is_approvable'] = is_so and (review_state == "opened") and info['review_state'] == 'cleared_and_validated'
-    else:
-        row['is_approvable'] = is_so and (review_state == "opened")
-    row['is_requeryable'] = False
-    #set_trace()
-    row['resp_desc'] = getattr(so_doc,'resp_desc','no response')
-    row['trans_ref'] = getattr(so_doc,'order_id','')
-    if so_doc.type_description.startswith('School Fee'):
-        if review_state == 'opened' and info['review_state'] == 'cleared_and_validated' and hasattr(so_doc, 'order_id') and not so_doc.resp_code:
-            row['is_requeryable'] = True
-            row['callback_url'] = "%s/payments/%s/interswitch_cb" % (student.absolute_url(),
-                                                            so.getId)
-            href = '%(query_url)s' % info
-            href += '?transRef=%(trans_ref)s' % row
-            href += '&prodID=%(prod_id)s' % info
-            href += '&redirectURL=%(callback_url)s' % row
-            row['href'] = href
-    if (review_state == "closed") and so_doc.resp_code in ('SC','00','AP','IP',):
-        row['confirmed'] = 'active'
-    else:
-        row['confirmed'] = 'unsuccessful'
-    row['is_editable'] = is_so and (row['confirmed'] == 'active')
-
-    payments.append(row)
-
-payments.sort(cmp_id)
-info['payments'] = payments
-return info
-
Index: WAeUP_SRP/base/skins/waeup_epayment/goto_interswitch_form.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/goto_interswitch_form.pt	(revision 2828)
+++ 	(revision )
@@ -1,43 +1,0 @@
-<metal:body use-macro="here/main_template/macros/master">
-    <metal:main fill-slot="main"
-                tal:define="info options/info">
-                
-        <h3>Authorize Online Payment! </h3>
-        <br />
-                
-      <form method="post" action="pay_online"
-            tal:attributes="action info/action ">
-      <span tal:repeat="arg python:info['args'].items()"
-            tal:omit-tag="">
-          <input type="hidden" tal:attributes="name python:arg[0];value python:arg[1]" />
-      </span>          
-        <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>
-            <td >
-            Amount:
-            </td>
-            <td> Naira <span tal:content="info/amount" /></td>
-          </tr>
-      
-        </table>
-        <br />
-        <input type="submit" 
-               class="standalone" 
-               name="goto_bank" 
-               value="Proceed to Payment Gateway" 
-               />
-      </form>
-    </metal:main>
-</metal:body>
-
Index: WAeUP_SRP/base/skins/waeup_epayment/interswitch_form.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/interswitch_form.pt	(revision 2828)
+++ 	(revision )
@@ -1,41 +1,0 @@
-<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">
-        <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>
-            <td >
-            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/base/skins/waeup_epayment/pay_interswitch.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/pay_interswitch.py	(revision 2828)
+++ 	(revision )
@@ -1,162 +1,0 @@
-## 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_interswitch')
-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)
-
-sbrain = context.students_catalog(id=student_id)[0]
-#amount,description = context.getSchoolFee(sbrain.faculty,sbrain.session,sbrain.course)
-info = {}
-info['student'] = sbrain
-info['payment_possible'] = False
-info['amount'] = '0'
-info['bank'] = ''
-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'
-if not fee_dict or (not new and fulltime) or not (new or returning):
-    return context.interswitch_form(info=info)
-info['site_id'] = '61'
-info['currency_id'] = '566'
-if new:
-    amount = info['amount'] = fee_dict['new']
-elif returning:
-    amount = info['amount'] = fee_dict['returning']
-if fulltime:
-    pay_item_id = "6100"
-    info['type_code'] = sbrain.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['bank'] = ''
-info['payment_possible'] = True
-info['type_description'] = fee_dict['description']
-info['pay_bill_to'] = sbrain.name
-info['pay_ship_to'] = "University of Benin"
-info['student_id'] = student_id
-info['student_name'] = sbrain.name
-info['student_email'] = sbrain.email
-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 True or context.portal_url().find('uniben-demo.waeup.org') >-1 or\
-   context.portal_url().find('uniben.waeup.org') >-1:
-    info['action'] = "https://webpay.interswitchng.com/paydirect/webpay/pay.aspx"
-else:
-    #pass
-    #return None
-    info['action'] = "%s/payments/%s/simulate_callback" % (student.absolute_url(),p_id)
-
-
-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', p_id)
-payment = getattr(payments,p_id)
-wftool.doActionFor(payment,'open')
-d = {}
-d.update(info)
-#from Products.zdb import set_trace;set_trace()
-payment.getContent().edit(mapping=d)
-#wftool.doActionFor(payment,'close')
-#wftool.doActionFor(student,'pay_school_fee')
-info['callback_url'] = "%s/payments/%s/interswitch_cb?echo=%s" % (student.absolute_url(),
-                                                                  p_id,
-                                                                  p_id)
-
-logger.info('%(student_id)s initiated online school 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]
-itotal = int(amount)*100
-wema_amount = 10000
-provider_amount = 35000
-interswitch_amount = 15000
-#uniben_amount = itotal - wema_amount - provider_amount - interswitch_amount
-uniben_amount = itotal - interswitch_amount
-xmldict = {}
-xmldict['detail_ref'] = args['txn_ref']
-xmldict['department'] = sbrain.department
-xmldict['faculty'] = sbrain.faculty
-#xmldict['wema_amt'] = "%d" % wema_amount
-#xmldict['provider_amt'] = "%d" % provider_amount
-xmldict['uniben_amt'] = "%d" % uniben_amount
-##<item_detail item_id="2" item_name="WEMA" item_amt="%(wema_amt)s" bank_id="16" acct_num="48398023902" />
-##<item_detail item_id="3" item_name="Portal Provider" item_amt="%(provider_amt)s" bank_id="47" acct_num="0980938209483" />
-xmltext = """
-<payment_item_detail>
-<item_details detail_ref="%(detail_ref)s" college="UNIBEN" department="%(department)s"
-faculty="%(faculty)s">
-<item_detail item_id="1" item_name="UNIBEN" item_amt="%(uniben_amt)s" bank_id="16" acct_num="384950902390" />
-</item_details>
-</payment_item_detail>
-""" % xmldict
-#total = int(xmldict['uniben_amt'])+int(xmldict['wema_amt'])+int(xmldict['provider_amt'])
-total = int(xmldict['uniben_amt'])
-args['Amount'] = "%d" % (total + 15000)
-args['site_name'] = "uniben.waeup.org"
-args['cust_name_desc'] = "Student Name"
-args['pay_item_id'] = pay_item_id
-args['pay_item_name'] = "UNIBEN Tuition Payments"
-args['payment_params'] = 'switch_college_split'
-#args['xml_data'] = xmltext % info
-args['xml_data'] = ''
-info['args'] = args
-return context.goto_interswitch_form(info=info)
