Ignore:
Timestamp:
17 Mar 2012, 10:16:07 (13 years ago)
Author:
Henrik Bettermann
Message:

Implement eTranzact payment and restructure change school fee payment.

Session 2011/2012: eTranzact and Interswitch payments only
Previous sessions: scratch card payments only

File:
1 edited

Legend:

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

    r7900 r7901  
    4242info['student_name'] = student_record.name
    4343info['query_url'] = "https://webpay.interswitchng.com/paydirect/services/TransactionQueryURL.aspx"
     44info['query_url_tranzact'] = "http://demo.etranzact.com:8080/WebConnect/queryPayoutletTransaction.jsp"
    4445review_state = info['review_state'] = student_record.review_state
    4546parttime = student_record.mode and student_record.mode.endswith('_pt')
     
    5657# begin customization
    5758
    58 # special handling of 06 DPA students (ticket 658)
    59 if review_state == 'cleared_and_validated' and session in ('06') and student_record.course == 'DPA':
     59if session in ('11','12','13'):
     60    info['payment_method'] = "online_payment"
     61else:
    6062    info['payment_method'] = "sc_payment"
    61 # special handling of 06 payments for testing purposes     
    62 elif review_state == 'cleared_and_validated' and session in ('06'):
    63     info['payment_method'] = "online_payment"
    64 elif review_state == 'returning' and info['next_session'] == '06':
    65     info['payment_method'] = "both_payments"
    66 elif review_state == 'cleared_and_validated' and session not in ('07','08'):
    67     info['payment_method'] = "both_payments"
    68 elif review_state == 'cleared_and_validated' and session in ('07','08'):
    69     info['payment_method'] = "sc_payment"
    70 elif review_state == 'returning' and info['next_session'] != session:
    71     info['payment_method'] = "sc_payment"
    72 
    73 
    7463
    7564info['prod_id'] = '61'
     
    115104    row['sort_param'] = payment.date
    116105    url = row['url'] = "%s/p%s" % (payments_path,oid[start_pos:])
    117     row['is_requeryable'] = "%s_%s" % (payment.category,payment.session_id) not in paid_fees and payment.type == 'online' or str(member) in ('admin',)
    118     row['is_approvable'] = is_so and row['is_requeryable'] and payment.category == 'schoolfee' # does not make sense for maitenance
     106    row['is_requeryable_interswitch'] = "%s_%s" % (payment.category,payment.session_id) not in paid_fees and payment.type == 'online' #or str(member) in ('admin',)
     107    row['is_requeryable_etranzact'] = "%s_%s" % (payment.category,payment.session_id) not in paid_fees and payment.type == 'etranzact' #or str(member) in ('admin',)
     108    row['is_approvable'] = is_so and (row['is_requeryable_interswitch'] or row['is_requeryable_etranzact'])and payment.category == 'schoolfee' # does not make sense for maitenance
    119109    row['resp_desc'] = payment.resp_desc or 'Payment Process Interrupted'
    120110    row['trans_ref'] = payment.order_id
    121     if row['is_requeryable']:
    122         row['callback_url'] = "%(url)s/interswitch_cb" % row
     111    if row['is_requeryable_interswitch']:
     112        row['callback_url_inter'] = "%(url)s/interswitch_cb" % row
    123113#        if payment.category == 'schoolfee':
    124114#            row['callback_url'] = "%(url)s/interswitch_cb" % row
     
    129119        href += '?transRef=%(trans_ref)s' % row
    130120        href += '&prodID=%(prod_id)s' % info
    131         href += '&redirectURL=%(callback_url)s' % row
    132         row['href'] = href
     121        href += '&redirectURL=%(callback_url_inter)s' % row
     122        row['href_inter'] = href
     123
     124    if row['is_requeryable_etranzact']:
     125        row['callback_url_tranzact'] = "%(url)s/tranzact_cb" % row
     126#        if payment.category == 'schoolfee':
     127#            row['callback_url'] = "%(url)s/interswitch_cb" % row
     128#        elif payment.category == 'hostel_maintenance':
     129#            row['callback_url'] = "%(url)s/interswitch_acco_cb" % row
     130#        else:
     131
     132        href = 'enter_tranzact_pin'
     133        href += '?query_url=%(query_url_tranzact)s' % info
     134        href += '&redirectURL=%(callback_url_tranzact)s' % row
     135        row['href_tranzact'] = href
     136
    133137    if payment.status == 'paid':
    134138        row['confirmed'] = 'active'
Note: See TracChangeset for help on using the changeset viewer.