Ignore:
Timestamp:
28 Oct 2007, 16:47:34 (17 years ago)
Author:
joachim
Message:

include reasons if payment is not possible

File:
1 edited

Legend:

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

    r2459 r2461  
    5454parttime = s_brain.mode.endswith('_pt')
    5555fulltime = s_brain.mode.endswith('_ft')
    56 online_payment = False
    57 sc_payment = False
    5856
    5957#if review_state == 'cleared_and_validated' or (parttime and review_state == 'returning'):
     
    6260#    sc_payment = True
    6361
    64 info['online_payment'] = online_payment
    65 info['sc_payment'] = sc_payment
    66 info['prod_id'] = '61'
    6762session = s_brain.session
    6863next_info = context.getNextInfo(s_brain)
    6964info['next_session'] = next_info['next_session_id']
    7065info['next_session_str'] = next_info['next_session_str']
     66info['payment_method'] = "done"
     67if next_info['next_transition'] is None and next_info['reasons']:
     68    info['payment_method'] = "not_possible"
     69    info['reasons'] = next_info['reasons']
     70elif review_state == 'cleared_and_validated':
     71    info['payment_method'] = "online_payment"
     72elif review_state == 'returning' and info['next_session'] != session:
     73    info['payment_method'] = "sc_payment"
    7174
    72 if review_state == 'cleared_and_validated':
    73     online_payment = True
    74 elif review_state == 'returning' and info['next_session'] != session:
    75     sc_payment = True
     75info['prod_id'] = '61'
     76
    7677
    7778info['student_name'] = s_brain.name
Note: See TracChangeset for help on using the changeset viewer.