Ignore:
Timestamp:
28 Oct 2008, 14:57:23 (16 years ago)
Author:
Henrik Bettermann
Message:

first customizations for FCE Oyo payments

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

Legend:

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

    r3714 r3739  
    1414
    1515
    16 ARTS = ('CRS','ISS','HIS','MUS','ECO','GEO','POL','SOS','CCA','ECU','THA','GED','GSE','PES','SPC','ENG ','FRE','ARB','HAU','IGB','YOR','FAA')
     16ARTS = ('CRS','ISS','MUS','SOS','THA','PES')
    1717
    18 # SCS = ('BIO','CHE','HED','MAT','PED','PHY ','CSC','ISC','PHE','AGE','BED','HEC','TED')
     18# SCS = ('BIO','HEC','MAT','ARB','ISC','IGB','YOR','HAU','ENG ','FRE','PHY ','CSC','PHE','AGE','FAA','BED','HEC')
    1919
    2020d = {}
     
    2323    if str(brain.level) == '000' and brain.review_state == 'cleared_and_validated':
    2424        if brain.department in ARTS:
    25             d['all'] = 15900
     25            d['all'] = 16950
    2626        else:
    27             d['all'] = 16400
     27            d['all'] = 17550
    2828    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated':
    2929        if brain.department in ARTS:
    30             d['all'] = 13020
     30            d['all'] = 9820
    3131        else:
    32             d['all'] = 13495
     32            d['all'] = 10420
    3333    elif str(brain.level) == '100' and brain.review_state == 'returning':
    3434        if brain.department in ARTS:
    35             d['all'] = 12070
     35            d['all'] = 7820
    3636        else:
    37             d['all'] = 12545
     37            d['all'] = 8420
    3838    elif str(brain.level) in ('200','210','220'):
    3939        if brain.department in ARTS:
    40             d['all'] = 12070
     40            d['all'] = 5450
    4141        else:
    42             d['all'] = 12545
     42            d['all'] = 6050
    4343    # repeaters = spillover
    44     elif str(brain.level) in ('300','310','320'):
     44    elif str(brain.level) == '300':
    4545        if brain.department in ARTS:
    46             d['all'] = 10170
     46            d['all'] = 6200
    4747        else:
    48             d['all'] = 10645
     48            d['all'] = 6800
     49    elif str(brain.level) in ('310','320'):
     50        if brain.department in ARTS:
     51            d['all'] = 4950
     52        else:
     53            d['all'] = 6800           
    4954    else:
    5055        d['all'] = 0
     
    5257    if str(brain.level) == '100' and brain.review_state == 'cleared_and_validated':
    5358        if brain.department in ARTS:
    54             d['all'] = 21900
     59            d['all'] = 11000
    5560        else:
    56             d['all'] = 22400
     61            d['all'] = 11000
    5762    elif str(brain.level) == '100' and brain.review_state == 'returning':
    5863        if brain.department in ARTS:
    59             d['all'] = 18400
     64            d['all'] = 11000
    6065        else:
    61             d['all'] = 18900
     66            d['all'] = 11000
    6267    elif str(brain.level) in ('200','210','220'):
    6368        if brain.department in ARTS:
    64             d['all'] = 20400
     69            d['all'] = 10000
    6570        else:
    66             d['all'] = 20900
     71            d['all'] = 10000
    6772    elif str(brain.level) in ('300','310','320'):
    6873        if brain.department in ARTS:
    69             d['all'] = 18400
     74            d['all'] = 9500
    7075        else:
    71             d['all'] = 18900
     76            d['all'] = 9500
    7277
     78    # repeaters = spillover
    7379    elif str(brain.level) in ('400','410','420'):
    7480        if brain.department in ARTS:
    75             d['all'] = 18400
     81            d['all'] = 9000
    7682        else:
    77             d['all'] = 18900
     83            d['all'] = 9000
    7884
    79     # repeaters = spillover
    80     elif str(brain.level) in ('500','510','520'):
    81         if brain.department in ARTS:
    82             d['all'] = 16900
    83         else:
    84             d['all'] = 17400
    8585    else:
    8686        d['all'] = 0
  • WAeUP_SRP/trunk/skins/waeup_fceoyo/pay_interswitch.py

    r3714 r3739  
    4848    return context.interswitch_form(info=info)
    4949
    50 info['site_id'] = '83'
     50info['site_id'] = '115'
    5151info['currency_id'] = '566'
     52pay_item_id = "11500"
    5253
    53 pay_item_id = "8302"
    5454#info['type_code'] = sbrain.course  #type_code is redundant and will be removed soon
    5555info['bank'] = ''
     
    6767now = DateTime.DateTime()
    6868info['date'] = now
    69 info['pay_ship_to'] = "Federal College of Education Okene"
     69info['pay_ship_to'] = "Federal College of Education Oyo"
    7070timestamp = "%d" % int(now.timeTime()*1000)
    7171info['order_id'] = "%s%s" % (student_id[1:],timestamp)
     
    7373
    7474
    75 info['surcharge'] = interswitch_amount = '150'
     75info['surcharge'] = interswitch_amount = '300'
    7676info['amount'] = amount = fee_dict['all']
    7777total_amount = 100*int(amount) + 100*int(interswitch_amount)
     
    8282
    8383if True:
    84     info['action'] = "https://webpay.interswitchng.com/paydirect/webpay/pay.aspx"
     84    info['action'] = "https://webpay.interswitchng.com/test_paydirect/webpay/pay.aspx"
    8585else:
    8686    #pass
     
    128128    args[arg] = info[field]
    129129
     130bt_amount = 1750
     131
     132fceoyo_amount = amount - bt_amount   # das ist falsch hier
     133
     134xmldict = {}
     135xmldict['detail_ref'] = args['txn_ref']
     136xmldict['department'] = student_record.department
     137xmldict['faculty'] = student_record.faculty
     138xmldict['fceoyo_amount'] = "%d" % int(100*fceoyo_amount)
     139xmldict['bt_amount'] = "%d" % int(100*bt_amount)
     140
     141if student_record.mode.endswith('_pt'):
     142    xmldict['fceoyo_acct'] = "0321100000000046"
     143elif student_record.mode.endswith('_sw'):
     144    xmldict['fceoyo_acct'] = "0321100000000056"
     145else:
     146    xmldict['fceoyo_acct'] = "0000000000000000"
     147
     148
     149xmltext = """<payment_item_detail>
     150<item_details detail_ref="%(detail_ref)s" college="fceoyo" department="%(department)s" faculty="%(faculty)s">
     151<item_detail item_id="1" item_name="fceoyo" item_amt="%(fceoyo_amount)s" bank_id="89" acct_num="%(fceoyo_acct)s" />
     152<item_detail item_id="2" item_name="BT" item_amt="%(bt_amount)s" bank_id="89" acct_num="0061001000021095" />
     153</item_details>
     154</payment_item_detail>""" % xmldict
     155
     156info['xml_data'] = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
     157
    130158args['Amount'] = "%d" % (total_amount)
    131 args['site_name'] = "fceokene.waeup.org"
     159args['site_name'] = "fceoyo.waeup.org"
    132160args['cust_name_desc'] = "Student Name"
    133161args['pay_item_id'] = pay_item_id
    134 args['pay_item_name'] = "FCEOKENE Tuition Payments"
    135 args['payment_params'] = 'switch_college_split'
    136 args['xml_data'] = ''
     162args['pay_item_name'] = "FCE Oyo Tuition Payments"
     163args['payment_params'] = 'college_split'
     164#args['xml_data'] = ''
     165#args['xml_data'] = xmltext   # info['xml_data']can be used instead
    137166info['args'] = args
     167
    138168return context.goto_interswitch_form(info=info)
     169
Note: See TracChangeset for help on using the changeset viewer.