Ignore:
Timestamp:
23 Jan 2009, 12:24:32 (16 years ago)
Author:
Henrik Bettermann
Message:

Jason's version

Location:
WAeUP_SRP/trunk/skins/waeup_aaue
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_aaue/getSchoolFee.py

    r3865 r3872  
    1212return SchoolFee
    1313"""
    14 
     14MBL= ('MBA','MPAD','LLMCPL','LLMPIL')
    1515
    1616d = {}
    1717
    18 if brain.mode == '': 
    19 
    20 
    21 
    22 
     18if brain.mode.endswith('_ft'):
     19    # fresh full-time remedial
     20    if str(brain.level) == '000' and brain.review_state == 'cleared_and_validated':
     21        if brain.jamb_state == 'edo':
     22        d['all'] = 50000
     23        else:
     24            d['all'] = 60000
     25    # fresh tull-time students
     26    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated' and brain.faculty=='INE':
     27        if brain.jamb_state == 'edo':
     28            d['all'] = 22000
     29        else:
     30            d['all'] = 0
     31    # returning full-time students
     32    elif str(brain.level) == ('100','200','300','400') and brain.review_state == 'returning':
     33        if brain.jamb_state == 'edo':
     34            d['all'] = 4300
     35        else:
     36            d['all'] = 0
     37    # postgrad full-time students
     38    elif str(brain.level) == ('600') and brain.review_state == 'cleared_and_validated':
     39        if brain.jamb_state == 'edo':
     40            d['all'] = 62500
     41            if brain.jamb_lga == 'foreigner':
     42            d['all'] = 189500
     43            else:
     44                d['all'] = 69500
     45    elif str(brain.level) == ('700','800') and brain.certificate in 'MBL':
     46        if brain.jamb_state == 'edo':
     47            d['all'] = 89500
     48            if brain.jamb_lga == 'foreigner':
     49            d['all'] = 269500
     50            else:
     51                d['all'] = 99500
     52    elif str(brain.level) == ('700','800') and not in 'MBL':
     53        if brain.jamb_state == 'edo':
     54            d['all'] = 69500
     55            if brain.jamb_lga == 'foreigner':
     56            d['all'] = 219500
     57            else:
     58                d['all'] = 79500
     59   elif str(brain.level) == ('900','1000','1001'):
     60        if brain.jamb_state == 'edo':
     61            d['all'] = 99500
     62            if brain.jamb_lga == 'foreigner':
     63            d['all'] = 269500
     64            else:
     65                d['all'] = 109500             
     66else:
     67    # fresh part-time students
     68    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated' and brain.faculty=='INE':
     69        if brain.jamb_state == 'edo':
     70            d['all'] = 45000
     71        else:
     72            d['all'] = 55000
     73    # returning part-time students
     74    elif str(brain.level) == ('100','200','300','400') and brain.review_state == 'returning':
     75        if brain.jamb_state == 'edo':
     76            d['all'] = 30000
     77        else:
     78            d['all'] = 40000
     79    # postgrad part-time students
     80    elif str(brain.level) == ('600') and brain.review_state == 'cleared_and_validated':
     81        if brain.jamb_state == 'edo':
     82            d['all'] = 64500
     83            if brain.jamb_lga == 'foreigner':
     84            d['all'] = 219500
     85            else:
     86                d['all'] = 74500
    2387else:
    2488    d['all'] = 0
    2589
    26 d['all'] = 0
    2790
    2891next_info = context.getNextInfo(brain)
     
    3295
    3396return d
     97
  • WAeUP_SRP/trunk/skins/waeup_aaue/pay_interswitch.py

    r3841 r3872  
    4848    return context.interswitch_form(info=info)
    4949
    50 info['site_id'] = '119'
     50info['site_id'] = '115'
    5151info['currency_id'] = '566'
    52 pay_item_id = "10900"
     52pay_item_id = "11900"
    5353
    5454#info['type_code'] = sbrain.course  #type_code is redundant and will be removed soon
     
    6767now = DateTime.DateTime()
    6868info['date'] = now
    69 info['pay_ship_to'] = "Adekunle Ajasin University"
     69info['pay_ship_to'] = "Ambrose Alli University Ekpoma"
    7070timestamp = "%d" % int(now.timeTime()*1000)
    7171info['order_id'] = "%s%s" % (student_id[1:],timestamp)
    7272p_id = "p%s" % timestamp
    73 
    74 
    75 info['surcharge'] = interswitch_amount = '150'
     73info['surcharge'] = interswitch_amount = 300
    7674info['amount'] = amount = fee_dict['all']
    77 total_amount = 100*int(amount) + 100*int(interswitch_amount)
    78 
    7975
    8076if student_id is None:
     
    8278
    8379if True:
    84     info['action'] = "https://webpay.interswitchng.com/test_paydirect/webpay/pay.aspx"
     80    info['action'] = "https://webpay.interswitchng.com/paydirect/webpay/pay.aspx"
    8581else:
    8682    #pass
     
    113109                                                                  p_id,
    114110                                                                  p_id)
     111                                                                 
     112
     113                                                         
    115114
    116115logger.info('%(student_id)s initiated online school fee payment with order_id %(order_id)s and callback url %(callback_url)s' % info)
     
    129128
    130129bt_amount = 4000
     130aaue_split = 1000
    131131
    132 aaue_amount = amount - bt_amount
     132#getSchoolFee provides pure school fee, the other fees have to be added
     133total_amount = 100* (amount + interswitch_amount + bt_amount + aaue_split)       
     134
     135
    133136xmldict = {}
    134137xmldict['detail_ref'] = args['txn_ref']
    135138xmldict['department'] = student_record.department
    136139xmldict['faculty'] = student_record.faculty
    137 xmldict['aaue_amount'] = "%d" % int(100*aaue_amount)
     140xmldict['amount'] = "%d" % int(100*amount)
    138141xmldict['bt_amount'] = "%d" % int(100*bt_amount)
    139 if student_record.mode.endswith('_pt'):
    140     xmldict['aaue_acct'] = ""
    141 elif student_record.mode.endswith('_sw'):
    142     xmldict['aaue_acct'] = ""
     142
     143if student_record.mode in ('ug_ft','ug_pt','pg_ft','pgd_ft):
     144    xmldict['aaue_acct'] = "6020008887"
     145    xmldict['bank_id'] = '123'
    143146else:
    144     xmldict['aaue_acct'] = "0000000000000000"
     147    xmldict['aaue_acct'] = "0000000000000"
     148    xmldict['bank_id'] = '0'
     149
     150xmldict['aaue_split'] = "%d" % int(100*aaue_split)
    145151
    146152
    147153xmltext = """<payment_item_detail>
    148 <item_details detail_ref="%(detail_ref)s" college="AAUE" department="%(department)s" faculty="%(faculty)s">
    149 <item_detail item_id="1" item_name="AAUE" item_amt="%(aaue_amount)s" bank_id="89" acct_num="%(aaue_acct)s" />
    150 <item_detail item_id="2" item_name="BT" item_amt="%(bt_amount)s" bank_id="117" acct_num="6012015294" />
     154<item_details detail_ref="%(detail_ref)s" college="aaue" department="%(department)s" faculty="%(faculty)s" >
     155<item_detail item_id="1" item_name="AAUE School Fee" item_amt="%(amount)s" bank_id="123" acct_num="6020008887" />
     156<item_detail item_id="2" item_name="AAUE Split" item_amt="%(aaue_split)s" bank_id="123" acct_num="6020008887" />
     157<item_detail item_id="3" item_name="BT" item_amt="%(bt_amount)s" bank_id="89" acct_num="0061001000021096" />
    151158</item_details>
    152159</payment_item_detail>""" % xmldict
     
    158165args['cust_name_desc'] = "Student Name"
    159166args['pay_item_id'] = pay_item_id
    160 args['pay_item_name'] = "AAUE Tuition Payments"
     167args['pay_item_name'] = "Ambrose Alli University Ekpoma Tuition Payments"
    161168args['payment_params'] = 'college_split'
    162169#args['xml_data'] = ''
Note: See TracChangeset for help on using the changeset viewer.