Changeset 3898


Ignore:
Timestamp:
31 Jan 2009, 14:49:25 (16 years ago)
Author:
Henrik Bettermann
Message:

make payment work

Technically it's working now but I don't know if the school fees is really correct.

Jason, please check the changes! Do not upload scripts with line numbers.

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

Legend:

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

    r3873 r3898  
    1717
    1818if brain.mode.endswith('_ft'):
    19     # fresh full-time remedial  (not in table???)
     19    # fresh full-time Foundation
    2020    if str(brain.level) == '000' and brain.review_state == 'cleared_and_validated':
    21         if brain.lga.startswith('edo'):
     21        if brain.entry_mode == 'rm_ft' and brain.lga.startswith('edo'):
    2222            d['all'] = 50000
    2323        else:
    2424            d['all'] = 60000
    25     # fresh tull-time students
     25    # fresh tull-time students INE
    2626    elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated' and brain.faculty == 'INE':
    2727        if brain.lga.startswith('edo'):
     
    2929        else:
    3030            d['all'] = 0
    31     # returning full-time students (INE???)
    32     elif str(brain.level) in ('100','200','300','400','110','210','310','410') and brain.review_state == 'returning':
     31    # returning full-time students INE
     32    elif str(brain.level) in ('100','200','300','400','110','210','310','410') and brain.review_state == 'returning' and brain.faculty == 'INE':
    3333        if brain.lga.startswith('edo'):
    3434            d['all'] = 4300
    3535        else:
    3636            d['all'] = 0
    37     # postgrad full-time students (fresh???)
     37    # postgrad full-time students (fresh)
    3838    elif str(brain.level) == ('600') and brain.review_state == 'cleared_and_validated':
    3939        if brain.lga.startswith('edo'):
     
    4343        else:
    4444            d['all'] = 69500
    45     # MBL students (fresh and/or returning ???)        
     45    # MBL students (fresh or returning)       
    4646    elif str(brain.level) in ('700','800','710','810') and brain.certificate in MBL:
    4747        if brain.lga.startswith('edo'):
     
    5151        else:
    5252            d['all'] = 99500
    53     # non-MBL students (fresh and/or returning ???)   
     53    # non-MBL students (fresh or returning)   
    5454    elif str(brain.level) in ('700','800','710','810'):
    5555        if brain.lga.startswith('edo'):
     
    5959        else:
    6060            d['all'] = 79500
    61     # PHD ????        
    62     elif str(brain.level) in ('900','1000','1001'):
     61    # PHD Students       
     62    elif str(brain.level) in ('900','910','1000','1010'):
    6363        if brain.lga.startswith('edo'):
    6464            d['all'] = 99500
     
    6666            d['all'] = 269500
    6767        else:
    68             d['all'] = 109500             
     68            d['all'] = 109500         
     69    else:
     70        d['all'] = 0       
    6971else:
    7072    # fresh part-time students INE
    71     elif str(brain.level) == '100' and brain.review_state == 'cleared_and_validated' and brain.faculty == 'INE':
     73    if str(brain.level) == '100' and brain.review_state == 'cleared_and_validated' and brain.faculty == 'INE':
    7274        if brain.lga.startswith('edo'):
    7375            d['all'] = 45000
    7476        else:
    7577            d['all'] = 55000
    76     # returning part-time students (INE???))
    77     elif str(brain.level) in ('100','200','300','400','110','210','310','410') and brain.review_state == 'returning':
     78    # returning part-time students INE
     79    elif str(brain.level) in ('100','200','300','400','110','210','310','410') and brain.review_state == 'returning' and brain.faculty == 'INE':
    7880        if brain.lga.startswith('edo'):
    7981            d['all'] = 30000
     
    8890        else:
    8991            d['all'] = 74500
    90 else:
    91     d['all'] = 0
     92    else:
     93        d['all'] = 0
    9294
    9395
     
    98100
    99101return d
    100 
  • WAeUP_SRP/trunk/skins/waeup_aaue/pay_interswitch.py

    r3872 r3898  
    3434
    3535student_record = context.students_catalog.getRecordByKey(student_id)
    36 #amount,description = context.getSchoolFee(student_record.faculty,student_record.session,student_record.course)
    3736info = {}
    3837info['student'] = student_record
     
    4847    return context.interswitch_form(info=info)
    4948
    50 info['site_id'] = '115'
     49info['site_id'] = '119'
    5150info['currency_id'] = '566'
    5251pay_item_id = "11900"
     
    7271p_id = "p%s" % timestamp
    7372info['surcharge'] = interswitch_amount = 300
    74 info['amount'] = amount = fee_dict['all']
     73amount = fee_dict['all']
     74
     75bt_amount = 4000
     76aaue_split = 1000
     77info['amount'] = amount + bt_amount + aaue_split   
    7578
    7679if student_id is None:
     
    7881
    7982if True:
    80     info['action'] = "https://webpay.interswitchng.com/paydirect/webpay/pay.aspx"
     83    info['action'] = "https://webpay.interswitchng.com/test_paydirect/webpay/pay.aspx"
    8184else:
    8285    #pass
     
    127130    args[arg] = info[field]
    128131
    129 bt_amount = 4000
    130 aaue_split = 1000
     132
    131133
    132134#getSchoolFee provides pure school fee, the other fees have to be added
    133 total_amount = 100* (amount + interswitch_amount + bt_amount + aaue_split)       
     135total_amount = 100* (amount + interswitch_amount + bt_amount + aaue_split)   
     136
    134137
    135138
     
    141144xmldict['bt_amount'] = "%d" % int(100*bt_amount)
    142145
    143 if student_record.mode in ('ug_ft','ug_pt','pg_ft','pgd_ft):
     146if student_record.mode in ('ug_ft','ug_pt','pg_ft','pgd_ft'):
    144147    xmldict['aaue_acct'] = "6020008887"
    145148    xmldict['bank_id'] = '123'
     
    149152
    150153xmldict['aaue_split'] = "%d" % int(100*aaue_split)
    151 
    152154
    153155xmltext = """<payment_item_detail>
     
    168170args['payment_params'] = 'college_split'
    169171#args['xml_data'] = ''
    170 #args['xml_data'] = xmltext   # info['xml_data']can be used instead
     172args['xml_data'] = xmltext   # info['xml_data']can be used instead
    171173info['args'] = args
    172174
Note: See TracChangeset for help on using the changeset viewer.