Changeset 5190 for WAeUP_SRP


Ignore:
Timestamp:
13 May 2010, 10:20:33 (15 years ago)
Author:
Henrik Bettermann
Message:

implement request payment

Location:
WAeUP_SRP/trunk
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/profiles/default/vocabularies/payment_types.xml

    r3689 r5190  
    1010    <item key="sc" msgid="">Scratch Card</item>
    1111    <item key="online" msgid="">Online</item>
     12    <item key="request" msgid="">Request</item>
    1213</object>
  • WAeUP_SRP/trunk/skins/waeup_aaue/getPaymentsFolderInfo.py

    r4204 r5190  
    9494        start_pos = 6
    9595    url = row['url'] = "%s/p%s" % (payments_path,oid[start_pos:])
    96     row['is_requeryable'] = "%s_%s" % (payment.category,payment.session_id) not in paid_fees and not payment.resp_desc and payment.type == 'online' or str(member) in ('admin','isouaba')  # customized too
    97     row['is_approvable'] = is_so and row['is_requeryable'] and payment.category == 'schoolfee' # does not make sense for maintenance
     96    row['is_requeryable'] = "%s_%s" % (payment.category,payment.session_id) not in paid_fees and (not payment.resp_desc or str(member) in ('admin','isouaba')) and payment.type == 'online'   # customized too
     97    row['is_requestable'] = "%s_%s" % (payment.category,payment.session_id) not in paid_fees and (not payment.resp_desc or str(member) in ('admin','isouaba')) and payment.type == 'request'  # customized too
     98    row['is_approvable'] = is_so and (row['is_requeryable'] or row['is_requestable']) and payment.category == 'schoolfee' # does not make sense for maintenance
    9899    row['resp_desc'] = payment.resp_desc or 'Payment Process Interrupted'
    99100    row['trans_ref'] = payment.order_id
     
    110111        href += '&redirectURL=%(callback_url)s' % row
    111112        row['href'] = href
     113    elif row['is_requestable']:
     114        row['callback_url'] = "%(url)s/interswitch_request_cb" % row
     115        #href = '%(query_url)s' % info
     116        href = "http://testwebpay.interswitchng.com/CollegepayService/TransactionQueryURL.aspx"
     117        href += '?redirectURL=%(callback_url)s' % row
     118        href += '&productid=53'
     119        href += '&merchantref=ignore'
     120        href += '&custNumber=%s' % student_id
     121        href += '&session=%s' % info['next_session_str']
     122        href += '&semester=Semester 1'             
     123        row['href'] = href       
    112124    if payment.status == 'paid':
    113125        row['confirmed'] = 'active'
  • WAeUP_SRP/trunk/skins/waeup_aaue/payment_receipt.pt

    r4064 r5190  
    4949        </metal:block>
    5050       
     51
     52        <metal:block tal:condition="info/is_request_pmt">           
     53        <h3>Scratch Card Payment Receipt</h3>
     54        <br />
     55        <table tal:define="student info/student;
     56                           pm nocall: info/payment_doc">
     57       
     58        <tr>
     59          <td width="220px">Name:</td>
     60          <td><span tal:content="student/name" /></td>
     61        </tr>
     62        <tr>
     63          <td>Student Id:</td>
     64          <td tal:content="student/id" />
     65        </tr>       
     66        <tr>
     67          <td>Registration Number:</td>
     68          <td tal:content="student/jamb_reg_no" />
     69        </tr>
     70        <tr>
     71          <td>Matriculation Number:</td>
     72          <td tal:content="student/matric_no" />
     73        </tr>                   
     74        <tr>
     75          <td>Certificate Id:</td>
     76          <td tal:content="student/course" />
     77        </tr>
     78        <tr>
     79          <td>Faculty:</td>
     80          <td tal:content="student/faculty" />
     81        </tr>       
     82        <tr>
     83          <td>Department:</td>
     84          <td tal:content="student/department" />
     85        </tr>             
     86
     87
     88        <tr>
     89          <td width="220px">Payment Status:</td>
     90          <td><span tal:content="python:context.portal_vocabularies.payment_status.get(pm.status)" /></td>
     91        </tr>   
     92        <tr>
     93          <td width="220px">Access Code:</td>
     94          <td><span tal:content="pm/order_id" /></td>
     95        </tr>     
     96        <tr>
     97          <td width="220px">Payment Type:</td>
     98         
     99          <td><span tal:content="python:context.portal_vocabularies.payment_types.get(pm.type)" /></td>
     100        </tr>   
     101        <tr>
     102          <td width="220px">Payment Category:</td>
     103          <td><span tal:content="python:context.portal_vocabularies.payment_categories.get(pm.category)" /></td>
     104        </tr>   
     105        <tr>
     106          <td width="220px">Payment Item:</td>
     107          <td><span tal:content="pm/item" /></td>
     108        </tr>       
     109        <tr>
     110          <td width="220px">Session:</td>
     111          <td><span tal:content="python:context.portal_vocabularies.sessions.get(pm.session_id)" /></td>
     112        </tr>                   
     113     
     114        <tr>       
     115          <td width="220px">Date of Request:</td>
     116          <td><span tal:content='python:pm.date.strftime("%d/%m/%y %H:%M:%S")' /></td>
     117        </tr>       
     118        <tr>
     119          <td width="220px">Approved Amount (Naira):</td>
     120          <td><span tal:content="pm/resp_approved_amount" /></td>
     121        </tr>   
     122        <tr>
     123          <td width="220px">Response Code:</td>
     124          <td><span tal:content="pm/resp_code" /></td>
     125        </tr>         
     126        <tr>
     127          <td width="220px">Response Description:</td>
     128          <td><span tal:content="pm/resp_desc" /></td>
     129        </tr>             
     130        </table>
     131        </metal:block>
     132
    51133       
    52134       
  • WAeUP_SRP/trunk/skins/waeup_aaue/payments_view.pt

    r5189 r5190  
    4747            </td>
    4848            <td>
    49               <a tal:condition="row/is_requeryable"
     49              <a tal:condition="row/is_requestable"
    5050                 tal:attributes="href row/href;
    5151                 onclick python:'return window.confirm(\'%s\')' %(cpsmcat('Are you sure?'), );"
     
    6868        <div>
    6969          <form tal:condition="python: info.get('payment_method') in ('online_payment','both_payments')"
    70                 tal:attributes="action string: ${context/absolute_url}/pay_interswitch" method="post" class="group">
     70                tal:attributes="action string: ${context/absolute_url}/request_interswitch" method="post" class="group">
    7171            <input type="submit" name="epayment"
    7272                   class="context"
    7373                   value="Pay"
    74                    tal:attributes="value string:Initiate ${info/next_session_str} School Fee Payment by Cash Card"
     74                   tal:attributes="value string:Request ${info/next_session_str} School Fee Payment Data from Interswitch"
    7575                   />
    7676          </form> 
    7777          <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">
     78                tal:attributes="action string: ${context/absolute_url}/request_interswitch" method="post" class="group">
    7979            <input type="submit" name="epayment"
    8080                   class="context"
    8181                   value="Pay"
    82                    tal:attributes="value string:Initiate ${info/next_session_str} School Fee Payment by Cash Card (First Instalment)"
     82                   tal:attributes="value string:Request ${info/next_session_str} School Fee Payment Data from Interswitch (First Instalment)"
    8383                   />
    8484          </form> 
    8585          <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">
     86                tal:attributes="action string: ${context/absolute_url}/request_interswitch2" method="post" class="group">
    8787            <input type="submit" name="epayment"
    8888                   class="context"
    8989                   value="Pay"
    90                    tal:attributes="value string:Initiate School Fee Payment by Cash Card (Second Instalment)"
     90                   tal:attributes="value string:Request School Fee Payment from Interswitch (Second Instalment)"
    9191                   />
    9292          </form>                       
    93           <form tal:condition="python: info.get('payment_method') in ('sc_payment','both_payments')"
    94                 tal:attributes="action string: ${context/absolute_url}/pay_by_sc" method="post" class="group">
    95             <input type="hidden" name="paid_session"
    96                    tal:attributes="value info/next_session"
    97                    />
    98             <input type="submit" name="epayment"
    99                    class="context"
    100                    value="Pay"
    101                    tal:attributes="value string:Initiate ${info/next_session_str} School Fee Payment by Scratch Card"
    102                    />
    103           </form>   
     93
    10494         
    10595          <form tal:condition="info/gown|nothing"
  • WAeUP_SRP/trunk/skins/waeup_epayment/getPaymentInfo.py

    r4530 r5190  
    3636payment = context.getContent()
    3737info['payment_doc'] = payment
    38 info['is_online_pmt'] = io = payment.resp_code in ('0','00','AP','IP')
     38info['is_online_pmt'] = io = payment.resp_code in ('0','00','AP','IP',)
     39info['is_request_pmt'] = io = payment.resp_code in ('RP',)
    3940info['is_scratchcard_pmt'] = isc =  payment.resp_code == 'SC'
    4041info['is_interrupted'] = ii = payment.resp_code == ''
Note: See TracChangeset for help on using the changeset viewer.