Changeset 2153 for WAeUP_SRP/trunk


Ignore:
Timestamp:
23 Aug 2007, 12:57:22 (17 years ago)
Author:
Henrik Bettermann
Message:

payment conditions fixed

Location:
WAeUP_SRP/trunk/skins/waeup_epayment
Files:
6 edited

Legend:

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

    r2152 r2153  
    5252info['query_url'] = "https://webpay.interswitchng.com/paydirect/services/TransactionQueryURL.aspx"
    5353review_state = info['review_state'] = s_brain.review_state
    54 if s_brain.mode.endswith('_pt'):
     54parttime = s_brain.mode.endswith('_pt')
     55fulltime = s_brain.mode.endswith('_ft')
     56online_payment = False
     57sc_payment = False
     58if parttime and review_state in ('cleared_and_validated','returning'):
    5559    online_payment = True
    56 else:
    57     online_payment = review_state == 'cleared_and_validated'
     60elif fulltime and review_state == 'returning':
     61    sc_payment = True
    5862info['online_payment'] = online_payment
     63info['sc_payment'] = sc_payment
    5964session = s_brain.session
    6065info['next_session'], info['next_session_str'] = context.getNextSessionId(session)
  • WAeUP_SRP/trunk/skins/waeup_epayment/getSchoolFee.py

    r2151 r2153  
    190190        f = 0
    191191    d['new'] = session_fees[brain.session][f]
    192     d['returning'] = session_fees[brain.session][f]
     192    d['returning'] = 'not set'
    193193    d['description'] = "School Fee for Session %s" % context.sessions_voc(key=brain.session)
    194194if pt_fees.has_key(brain.course):
    195195    d = pt_fees[brain.course]
    196     d['description'] = "School Fee for Session %s %s" % (context.sessions_voc(key=brain.session),
     196    d['description'] = "School Fee for Session %s, %s" % (context.sessions_voc(key=brain.session),
    197197                                                         d['description'])
    198198return d
  • WAeUP_SRP/trunk/skins/waeup_epayment/interswitch_form.pt

    r2151 r2153  
    55    <br />
    66    <span tal:condition="not: info/payment_possible">
    7       No payment Information for your course available.
     7      No payment information for your course available.
    88    </span>
    99    <span tal:condition="info/payment_possible">
  • WAeUP_SRP/trunk/skins/waeup_epayment/pay_by_sc.py

    r2135 r2153  
    3636session = s_brain.session
    3737next_session, next_session_str = context.getNextSessionId(session)
    38 amount,description = context.getSchoolFee(s_brain.faculty,session)
    3938validate = request.has_key("cpsdocument_create_button")
    4039res,psm,ds = lt.renderLayout(layout_id= 'student_schoolfee',
     
    8786except:
    8887    cost = "n/a"
    89    
     88
    9089if not hasattr(payments,p_id):
    9190    now = DateTime.DateTime()
  • WAeUP_SRP/trunk/skins/waeup_epayment/pay_interswitch.py

    r2151 r2153  
    3939info['payment_possible'] = False
    4040fee_dict = context.getSchoolFee(sbrain)
    41 if not fee_dict:
     41fulltime = sbrain.mode.endswith('_ft')
     42#new =  sbrain.entry_session == context.getSessionId()[-2:]
     43new = sbrain.review_state == 'cleared_and_validated'
     44returning = sbrain.review_state == 'returning'
     45if not fee_dict or (not new and fulltime) or not (new or returning):
    4246    return context.interswitch_form(info=info)
    43 info['payment_possible'] = True
    4447info['site_id'] = '61'
    4548info['currency_id'] = '566'
    46 if sbrain.entry_session == context.getSessionId()[-2:]:
     49if new:
    4750    amount = info['amount'] = fee_dict['new']
     51elif returning:
     52    amount = info['amount'] = fee_dict['returning']
    4853else:
    49     amount = info['amount'] = fee_dict['returning']
    50 if sbrain.mode.endswith('_ft'):
     54    amount = info['amount'] = '0'
     55if fulltime:
    5156    pay_item_id = "6100"
    5257    info['type_code'] = sbrain.faculty
     
    5459    pay_item_id = "6101"
    5560    info['type_code'] = sbrain.course
     61info['payment_possible'] = True
    5662info['type_description'] = fee_dict['description']
    5763info['pay_bill_to'] = sbrain.name
  • WAeUP_SRP/trunk/skins/waeup_epayment/payments_view.pt

    r2151 r2153  
    6464                   />
    6565          </form> 
    66           <form tal:condition="not: info/online_payment"
     66          <form tal:condition="info/sc_payment"
    6767                tal:attributes="action string: ${context/absolute_url}/pay_by_sc" method="post" class="group">
    6868            <input type="hidden" name="paid_session"
Note: See TracChangeset for help on using the changeset viewer.