Changeset 2836


Ignore:
Timestamp:
1 Dec 2007, 10:41:15 (17 years ago)
Author:
Henrik Bettermann
Message:

to save the day ...

pay_interswitch.py is not yet tested. The rest is already in custom.

Location:
WAeUP_SRP/fceokene
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/fceokene/profiles/default/layouts/payment.xml

    r2681 r2836  
    99 <property name="validate_values_expr"></property>
    1010 <widget name="amount" meta_type="String Widget">
    11   <property name="title">Amount Authorized</property>
     11  <property name="title">Fee Authorized</property>
    1212  <property name="fields">
    1313   <element value="amount"/>
    1414  </property>
    15   <property name="label">Amount Authorized</property>
    16   <property name="label_edit">Amount Authorized</property>
     15  <property name="label">Fee Authorized</property>
     16  <property name="label_edit">Fee Authorized</property>
    1717  <property name="readonly_layout_modes">
    1818   <element value="edit"/>
     
    123123  <property name="label_edit">Payment Description</property>
    124124  <property name="display_width">40</property>
    125   <property name="size_max">40</property> 
     125  <property name="size_max">40</property>
    126126  <property name="readonly_layout_modes"/>
    127127  <property name="hidden_layout_modes"/>
  • WAeUP_SRP/fceokene/waeup_custom/getSchoolFee.py

    r2646 r2836  
    1919
    2020d = {}
    21 if str(brain.level) == '100':
     21if str(brain.level) == '100' and brain.review_state == 'cleared_and_validated':
    2222    if brain.department in ARTS:
    2323        d['all'] = 11520
    2424    else:
    2525        d['all'] = 11995
    26 elif str(brain.level) == '200':
     26elif str(brain.level) == '100' and brain.review_state == 'returning':
    2727    if brain.department in ARTS:
    2828        d['all'] = 10570
    2929    else:
    3030        d['all'] = 11045
    31 elif str(brain.level) == '300':
     31elif str(brain.level) in ('200','300'):
    3232    if brain.department in ARTS:
    3333        d['all'] = 10570
  • WAeUP_SRP/fceokene/waeup_custom/pay_interswitch.py

    r2833 r2836  
    4545fulltime = sbrain.mode.endswith('_ft')
    4646
    47 # begin customization
    48 
    4947if not fee_dict:
    5048    return context.interswitch_form(info=info)
    51 amount = info['amount'] = fee_dict['all']
    52 info['pay_ship_to'] = "Federal College of Education Okene"
    53 
    54 # end customization
    55 
    5649
    5750info['site_id'] = '83'
     
    6659info['student_id'] = student_id
    6760info['student_name'] = sbrain.name
    68 info['type'] = 'ONL' 
     61info['type'] = 'ONL'
    6962info['status'] = 'started'
    7063info['target'] = sbrain.course
     
    7366now = DateTime.DateTime()
    7467info['date'] = now
     68info['pay_ship_to'] = "Federal College of Education Okene"
    7569timestamp = "%d" % int(now.timeTime()*1000)
    7670info['order_id'] = "%s%s" % (student_id[1:],timestamp)
    7771p_id = "p%s" % timestamp
    7872
    79 interswitch_amount = 15000
    80 info['surcharge'] = interswitch_amount/100
     73
     74info['surcharge'] = interswitch_amount = '150'
     75info['amount'] = amount = fee_dict['all']
     76total_amount = 100*int(amount) + 100*int(interswitch_amount)
     77
    8178
    8279if student_id is None:
     
    110107d.update(info)
    111108payment.getContent().edit(mapping=d)
     109
     110
    112111info['callback_url'] = "%s/payments/%s/interswitch_cb?echo=%s" % (student.absolute_url(),
    113112                                                                  p_id,
     
    127126for arg,field in payment_fields:
    128127    args[arg] = info[field]
    129 itotal = int(amount)*100
    130 total_amount = itotal + interswitch_amount
    131128
    132129args['Amount'] = "%d" % (total_amount)
Note: See TracChangeset for help on using the changeset viewer.