Changeset 5164 for WAeUP_SRP/trunk/skins


Ignore:
Timestamp:
21 Apr 2010, 05:46:29 (15 years ago)
Author:
Henrik Bettermann
Message:

implement AAUA split payment

Location:
WAeUP_SRP/trunk/skins
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_aaua/getPaymentsFolderInfo.py

    r3865 r5164  
    5656# begin customization
    5757
    58 if review_state == 'cleared_and_validated':
    59     info['payment_method'] = "online_payment"
    60 #elif review_state == 'cleared_and_validated' and session == '07':
    61 #    info['payment_method'] = "sc_payment"
    62 elif review_state == 'returning' and info['next_session'] != session:
    63     info['payment_method'] = "online_payment"
     58if review_state in ('cleared_and_validated','returning',):
     59    if session in ('07','06',):
     60        info['payment_method'] = "online_payment"
     61    else:
     62        info['payment_method'] = "first_instalment"
     63else:
     64    second_instalment_records = aq_payments(Eq('student_id',student_id) & Eq('category','schoolfee2') & Eq('session_id',session) & Eq('status','paid'))
     65    if not second_instalment_records:
     66        info['payment_method'] = "second_instalment"
     67    else:   
     68        pass
    6469info['prod_id'] = '105'
    6570
     
    99104    row['trans_ref'] = payment.order_id
    100105    if row['is_requeryable']:
    101         row['callback_url'] = "%(url)s/interswitch_cb" % row
    102 #        if payment.category == 'schoolfee':
    103 #            row['callback_url'] = "%(url)s/interswitch_cb" % row
     106        if payment.category == 'schoolfee':
     107            row['callback_url'] = "%(url)s/interswitch_cb" % row
     108        elif payment.category == 'schoolfee2':
     109            row['callback_url'] = "%(url)s/interswitch_cb2" % row           
    104110#        elif payment.category == 'hostel_maintenance':
    105111#            row['callback_url'] = "%(url)s/interswitch_acco_cb" % row
  • WAeUP_SRP/trunk/skins/waeup_aaua/getSchoolFee.py

    r5156 r5164  
    55##bind script=script
    66##bind subpath=traverse_subpath
    7 ##parameters=brain=None
     7##parameters=brain=None,instalment='0'
    88##title=
    99##
     
    1212return SchoolFee
    1313"""
    14 
    15 
     14 
    1615d = {}
    1716
    18 if brain.mode == 'ug_sw': 
     17if brain.mode == 'ug_sw':    # ug_sw students payment does not depend on the current session
    1918    if str(brain.level) in ('100','200',) and brain.review_state == 'cleared_and_validated':
    20         d['all'] = 40000
     19        d['all'] = 45000
    2120    elif str(brain.level) in ('100',):   #200 returning students
    22         d['all'] = 40000
    23     else:
    24         d['all'] = 30000
    25 elif brain.mode == 'pg_sw': 
    26     d['all'] = 35000
    27 elif brain.mode == 'dp_pt': 
    28     if str(brain.level) in ('100',) and brain.review_state == 'cleared_and_validated':    # only 100 fresh
    29         d['all'] = 40000
     21        d['all'] = 45000
    3022    else:
    3123        d['all'] = 35000
    32 elif brain.mode == 'ug_pt': 
    33     if str(brain.level) in ('100','200',) and brain.review_state == 'cleared_and_validated':    # only 100 or 200 fresh
    34         d['all'] = 50000
     24elif brain.mode == 'pg_sw':
     25     if str(brain.level) == '600' and brain.review_state == 'cleared_and_validated':    # only 600 fresh
     26         d['all'] = 65000
     27     else:   
     28        d['all'] = 80000
     29elif brain.session in ('06','07',):
     30    if brain.mode == 'dp_pt': 
     31        if str(brain.level) in ('100',) and brain.review_state == 'cleared_and_validated':    # only 100 fresh
     32            d['all'] = 40000
     33        else:
     34            d['all'] = 35000
     35    elif brain.mode == 'ug_pt': 
     36        if str(brain.level) in ('100','200',) and brain.review_state == 'cleared_and_validated':    # only 100 or 200 fresh
     37            d['all'] = 50000
     38        else:
     39            d['all'] = 45000
     40    elif brain.mode == 'pg_pt': 
     41        if str(brain.level) == '600' and brain.review_state == 'cleared_and_validated':    # only 600 fresh
     42            d['all'] = 60000
     43        elif str(brain.level) == '600' and brain.verdict == 'C':                           # 600 repeaters
     44            d['all'] = 55000
     45        elif str(brain.level) == '700' and brain.review_state == 'cleared_and_validated':  # only 700 fresh
     46            d['all'] = 75000     
     47        elif str(brain.level) == '600':                                                    # going to register for 700
     48            d['all'] = 75000       
     49        else:
     50            d['all'] = 65000
    3551    else:
    36         d['all'] = 45000
    37 elif brain.mode == 'pg_pt': 
    38     if str(brain.level) == '600' and brain.review_state == 'cleared_and_validated':    # only 600 fresh
    39         d['all'] = 60000
    40     elif str(brain.level) == '600' and brain.verdict == 'C':                           # 600 repeaters
    41         d['all'] = 55000
    42     elif str(brain.level) == '700' and brain.review_state == 'cleared_and_validated':  # only 700 fresh                                             # going to register for 700
    43         d['all'] = 75000     
    44     elif str(brain.level) == '600':                                                    # going to register for 700
    45         d['all'] = 75000       
     52        d['all'] = 0
     53elif brain.session in ('08',):
     54    if instalment == '1':
     55        d['all'] = 8888888      # for testing
     56        d['instalment'] = '1'
     57    elif instalment == '2':
     58        d['all'] = 9999999      # for testing
     59        d['instalment'] = '2'
    4660    else:
    47         d['all'] = 65000
     61        d['all'] = 0
    4862else:
    4963    d['all'] = 0
  • WAeUP_SRP/trunk/skins/waeup_aaua/pay_interswitch.py

    r5159 r5164  
    139139if student_record.mode.endswith('_pt'):
    140140    xmldict['aaua_acct'] = "0321100000000046"
     141    xmldict['bank_id'] = "89"
    141142elif student_record.mode.endswith('_sw'):
    142143    xmldict['aaua_acct'] = "2461770000021"
     144    xmldict['bank_id'] = "76"
    143145else:
    144146    xmldict['aaua_acct'] = "0000000000000000"
     
    147149xmltext = """<payment_item_detail>
    148150<item_details detail_ref="%(detail_ref)s" college="AAUA" department="%(department)s" faculty="%(faculty)s">
    149 <item_detail item_id="1" item_name="AAUA" item_amt="%(aaua_amount)s" bank_id="89" acct_num="%(aaua_acct)s" />
     151<item_detail item_id="1" item_name="AAUA" item_amt="%(aaua_amount)s" bank_id="%(bank_id)s" acct_num="%(aaua_acct)s" />
    150152<item_detail item_id="2" item_name="BT" item_amt="%(bt_amount)s" bank_id="117" acct_num="6012015294" />
    151153</item_details>
  • WAeUP_SRP/trunk/skins/waeup_epayment/payments_view.pt

    r4294 r5164  
    7575                   />
    7676          </form> 
     77          <form tal:condition="python: info.get('payment_method') in ('first_instalment',)"
     78                tal:attributes="action string: ${context/absolute_url}/pay_interswitch" method="post" class="group">
     79            <input type="submit" name="epayment"
     80                   class="context"
     81                   value="Pay"
     82                   tal:attributes="value string:Initiate ${info/next_session_str} School Fee Payment by Cash Card (First Instalment)"
     83                   />
     84          </form> 
     85          <form tal:condition="python: info.get('payment_method') in ('second_instalment',)"
     86                tal:attributes="action string: ${context/absolute_url}/pay_interswitch2" method="post" class="group">
     87            <input type="submit" name="epayment"
     88                   class="context"
     89                   value="Pay"
     90                   tal:attributes="value string:Initiate School Fee Payment by Cash Card (Second Instalment)"
     91                   />
     92          </form>                       
    7793          <form tal:condition="python: info.get('payment_method') in ('sc_payment','both_payments')"
    7894                tal:attributes="action string: ${context/absolute_url}/pay_by_sc" method="post" class="group">
Note: See TracChangeset for help on using the changeset viewer.