Ignore:
Timestamp:
12 Nov 2008, 13:19:51 (16 years ago)
Author:
Henrik Bettermann
Message:

new school fee logig for Oyo and Okene

Location:
WAeUP_SRP/trunk/skins/waeup_fceokene
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_fceokene/pay_interswitch.py

    r3690 r3759  
    5050info['site_id'] = '83'
    5151info['currency_id'] = '566'
     52pay_item_id = "8302"
    5253
    53 pay_item_id = "8302"
    5454#info['type_code'] = sbrain.course  #type_code is redundant and will be removed soon
    5555info['bank'] = ''
     
    128128    args[arg] = info[field]
    129129
     130bt_amount = 1600
     131fceokene_split = 1400
     132fceokene_amount = amount - bt_amount - fceokene_split
     133
     134xmldict = {}
     135xmldict['detail_ref'] = args['txn_ref']
     136xmldict['department'] = student_record.department
     137xmldict['faculty'] = student_record.faculty
     138xmldict['fceokene_amount'] = "%d" % int(100*fceokene_amount)
     139xmldict['bt_amount'] = "%d" % int(100*bt_amount)
     140xmldict['fceokene_split'] = "%d" % int(100*fceokene_split)
     141
     142if student_record.mode in ('ug_sw','prence',):
     143    xmldict['fceokene_acct'] = "04470040000032"
     144    xmldict['bank_id'] = '7'
     145elif student_record.mode in ('ug_ft',):
     146    xmldict['fceokene_acct'] = "2822010008611"
     147    xmldict['bank_id'] = '8'
     148else:
     149    xmldict['fceokene_acct'] = "0000000000000"
     150    xmldict['bank_id'] = '0'
     151
     152
     153xmltext = """<payment_item_detail>
     154<item_details detail_ref="%(detail_ref)s" college="FCE Okene" department="%(department)s" faculty="%(faculty)s">
     155<item_detail item_id="1" item_name="FCEOkene School Fee" item_amt="%(fceokene_amount)s" bank_id="%(bank_id)s" acct_num="%(fceokene_acct)s" />
     156<item_detail item_id="2" item_name="FCEOkene Split" item_amt="%(fceokene_split)s" bank_id="8" acct_num="2822040000037" />
     157<item_detail item_id="3" item_name="BT" item_amt="%(bt_amount)s" bank_id="89" acct_num="0061001000021095" />
     158</item_details>
     159</payment_item_detail>""" % xmldict
     160
     161info['xml_data'] = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
     162
    130163args['Amount'] = "%d" % (total_amount)
    131164args['site_name'] = "fceokene.waeup.org"
     
    133166args['pay_item_id'] = pay_item_id
    134167args['pay_item_name'] = "FCEOKENE Tuition Payments"
    135 args['payment_params'] = 'switch_college_split'
    136 args['xml_data'] = ''
     168args['payment_params'] = 'college_split'
     169#args['xml_data'] = ''
     170#args['xml_data'] = xmltext   # info['xml_data']can be used instead
    137171info['args'] = args
     172
    138173return context.goto_interswitch_form(info=info)
     174
Note: See TracChangeset for help on using the changeset viewer.