Ignore:
Timestamp:
8 Dec 2007, 14:05:39 (17 years ago)
Author:
joachim
Message:

include session_id for payment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/uniben/waeup_custom/pay_interswitch.py

    r2878 r2882  
    3333student = getattr(students,student_id)
    3434
    35 sbrain = context.students_catalog(id=student_id)[0]
    36 #amount,description = context.getSchoolFee(sbrain.faculty,sbrain.session,sbrain.course)
     35student_record = context.students_catalog.getRecordByKey(student_id)
     36#amount,description = context.getSchoolFee(student_record.faculty,student_record.session,student_record.course)
    3737info = {}
    38 info['student'] = sbrain
     38info['student'] = student_record
    3939info['payment_possible'] = False
    4040info['amount'] = '0'
     
    4242info['type_description'] = ''
    4343info['pay_bill_to'] = ''
    44 fee_dict = context.getSchoolFee(sbrain)
    45 fulltime = sbrain.mode.endswith('_ft')
    46 new = sbrain.review_state == 'cleared_and_validated'
    47 returning = sbrain.review_state == 'returning'
     44fee_dict = context.getSchoolFee(student_record)
     45fulltime = student_record.mode.endswith('_ft')
     46new = student_record.review_state == 'cleared_and_validated'
     47returning = student_record.review_state == 'returning'
    4848if not fee_dict or (not new and fulltime) or not (new or returning):
    4949    return context.interswitch_form(info=info)
     
    5656if fulltime:
    5757    pay_item_id = "6100"
    58     #info['type_code'] = sbrain.faculty   #type_code is redundant and will be removed soon
     58    #info['type_code'] = student_record.faculty   #type_code is redundant and will be removed soon
    5959    info['bank'] = ''
    6060else:
    6161    pay_item_id = "6101"
    62     #info['type_code'] = sbrain.course  #type_code is redundant and will be removed soon
     62    #info['type_code'] = student_record.course  #type_code is redundant and will be removed soon
    6363    info['bank'] = ''
    6464info['payment_possible'] = True
    6565info['type_description'] = fee_dict['description']
    66 info['pay_bill_to'] = sbrain.name
     66info['pay_bill_to'] = student_record.name
    6767info['pay_ship_to'] = "University of Benin"
    6868info['student_id'] = student_id
    69 info['student_name'] = sbrain.name
    70 info['student_email'] = sbrain.email
     69info['student_name'] = student_record.name
     70info['student_email'] = student_record.email
     71info['session_id'] = student_record.session
    7172info['type'] = 'online'
    7273info['status'] = 'started'
    73 info['target'] = sbrain.course
     74info['target'] = student_record.course
    7475info['subject'] = 'schoolfee'
    7576now = DateTime.DateTime()
     
    138139xmldict = {}
    139140xmldict['detail_ref'] = args['txn_ref']
    140 xmldict['department'] = sbrain.department
    141 xmldict['faculty'] = sbrain.faculty
     141xmldict['department'] = student_record.department
     142xmldict['faculty'] = student_record.faculty
    142143#xmldict['wema_amt'] = "%d" % wema_amount
    143144#xmldict['provider_amt'] = "%d" % provider_amount
Note: See TracChangeset for help on using the changeset viewer.