Changeset 8028 for WAeUP_SRP


Ignore:
Timestamp:
3 Apr 2012, 15:31:13 (13 years ago)
Author:
Henrik Bettermann
Message:

Implementation of acceptance fee payment via eTranzact.

Location:
WAeUP_SRP/trunk/skins/waeup_uniben
Files:
1 added
7 edited
1 moved

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_uniben/admission_form.pt

    r8022 r8028  
    1313                      app_email info/app_doc/app_email|nothing;
    1414                      app_passport info/has_passport;
    15                       data_complete python:app_passport and app_email;
     15                      data_complete python:True;
    1616                      ">
    1717         
     
    8484                       />
    8585                <input tal:condition="python:review_state in ('admitted', 'objection_raised',) and data_complete" type="submit" name="start_clearance:method"
    86                        class="context" value="Continue"
     86                       class="context" value="Enter Clearance PIN"
     87                       />
     88                <input tal:condition="python:review_state in ('admitted', 'objection_raised',) and data_complete" type="submit" name="payments:method"
     89                       class="context" value="Pay Acceptance Fee"
    8790                       />                       
    8891       </form>
  • WAeUP_SRP/trunk/skins/waeup_uniben/enter_tranzact_pin.pt

    r7901 r8028  
    33  <metal:body use-macro="here/main_template/macros/master">
    44    <metal:main fill-slot="main">
    5       <h3>Re-query eTranzact payment!</h3>
     5      <h3>Query eTranzact payment!</h3>
    66      <br />
    77      <form id="form1" name="form1" method="post" tal:attributes= "action query_url">
  • WAeUP_SRP/trunk/skins/waeup_uniben/etranzact_cb.py

    r7998 r8028  
    4343ontest = True
    4444
    45 if not ontest and not 'webpay.interswitchng.com' in referer and not 'waeup.org' in referer:
     45if not ontest and not 'xyz' in referer and not 'waeup.org' in referer:
    4646    logger.info('%s, wrong callback referer %s, callback rejected, IP = %s' % (student_id,referer,real_ip))
    4747    return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
     
    9191pay_doc = context.getContent()
    9292
    93 if pay_doc['order_id'] != success_dict['PAYMENT_CODE']:
     93if pay_doc['order_id'] != success_dict['PAYMENT_CODE'] and not ontest :
    9494    logger.info('%s requeried payment %s for %s but wrong payment code %s returned' % (member,context.getId(),student_id,success_dict['PAYMENT_CODE']))
    9595    return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
    9696
    97 if pay_doc['amount'] != success_dict['TRANS_AMOUNT']:
     97if pay_doc['amount'] != success_dict['TRANS_AMOUNT'] and not ontest :
    9898    logger.info('%s requeried payment %s for %s but wrong amount %s returned' % (member,context.getId(),student_id,success_dict['TRANS_AMOUNT']))
    9999    return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
     
    111111session = s_brain.session
    112112
    113 next_info = context.getNextInfo(s_brain)
    114 next_session_id = next_info['next_session_id']
    115 next_session_str = next_info['next_session_str']
    116 next_level_id = next_info['next_level_id']
    117 next_transition = next_info['next_transition']
    118 next_verdict = next_info['next_verdict']
    119 next_previous_verdict = next_info['next_previous_verdict']
    120113if pay_doc.category == 'schoolfee':
     114    next_info = context.getNextInfo(s_brain)
     115    next_session_id = next_info['next_session_id']
     116    next_session_str = next_info['next_session_str']
     117    next_level_id = next_info['next_level_id']
     118    next_transition = next_info['next_transition']
     119    next_verdict = next_info['next_verdict']
     120    next_previous_verdict = next_info['next_previous_verdict']
    121121    if context.getStudentReviewState() == "school_fee_paid":
    122122        logger.info('%s paid school_fee in state school_fee_paid' % (student_id))
  • WAeUP_SRP/trunk/skins/waeup_uniben/etranzact_form.pt

    r7901 r8028  
    55    <br />
    66    <span tal:condition="not: info/payment_possible">
    7       No payment information for your course available.
     7      No payment information available.
    88    </span>
    99    <span tal:condition="info/payment_possible">
    10       <form method="post" action="pay_etranzact">
     10      <form method="post" tal:attributes="action info/action">
    1111        <table>
    1212          <tr>
  • WAeUP_SRP/trunk/skins/waeup_uniben/getPaymentsFolderInfo.py

    r8011 r8028  
    7979    pass
    8080
     81if review_state == 'admitted':
     82    info['acceptance'] = True
     83else:
     84    info['acceptance'] = False
     85
    8186# end customization
    8287
     
    129134
    130135    if row['is_requeryable_etranzact']:
    131         row['callback_url_tranzact'] = "%(url)s/tranzact_cb" % row
     136        row['callback_url_tranzact'] = "%(url)s/etranzact_cb" % row
    132137#        if payment.category == 'schoolfee':
    133138#            row['callback_url'] = "%(url)s/interswitch_cb" % row
  • WAeUP_SRP/trunk/skins/waeup_uniben/getSchoolFee.py

    r7901 r8028  
    586586    d = all_fees[brain.course]
    587587    d['description'] = "%s (%s)" % (description,brain.course)
     588else:
     589    return None
    588590   
    589591d['next_session_id'] = next_info['next_session_id']
  • WAeUP_SRP/trunk/skins/waeup_uniben/pay_etranzact.py

    r8005 r8028  
    3636#amount,description = context.getSchoolFee(student_record.faculty,student_record.session,student_record.course)
    3737info = {}
     38info['action'] = 'pay_etranzact'
    3839info['student'] = student_record
    3940info['payment_possible'] = False
  • WAeUP_SRP/trunk/skins/waeup_uniben/payments_view.pt

    r7901 r8028  
    7474        <br />
    7575        <div>
     76
     77          <form tal:condition="info/acceptance|nothing"
     78                tal:attributes="action string: ${context/absolute_url}/pay_etranzact_accept" method="post" class="group">
     79            <input type="submit" name="epayment"
     80                   class="context"
     81                   value="Initiate Acceptance Fee Payment (eTranzact)"
     82                   />
     83            <br /><br />
     84            <font tal:condition="python:False" color='red'>Surcharge for Late Registration is 10000 Naira. </font>
     85          </form>
     86
    7687          <form tal:condition="python: info.get('payment_method') in ('online_payment','both_payments')"
    7788                tal:attributes="action string: ${context/absolute_url}/pay_interswitch" method="post" class="group">
Note: See TracChangeset for help on using the changeset viewer.