Changeset 3280 for WAeUP_SRP/base


Ignore:
Timestamp:
7 Mar 2008, 09:11:23 (17 years ago)
Author:
Henrik Bettermann
Message:

complete scratch card payment receipt

Location:
WAeUP_SRP/base/skins/waeup_epayment
Files:
2 edited

Legend:

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

    r2975 r3280  
    2121        pass
    2222
    23 # request = context.REQUEST
    24 # mtool = context.portal_membership
    25 # wf = context.portal_workflow
    26 # member = mtool.getAuthenticatedMember()
    27 # member_id = str(member)
    28 
    29 # if mtool.isAnonymousUser():
    30 #     return None
    31 # info = {}
    32 # requested_id = context.getStudentId()
    33 # if requested_id and not context.isStaff() and member_id != requested_id:
    34 #     logger.info('%s tried to access %s' % (member_id,requested_id))
    35 #     return None
    36 # elif context.isStaff():
    37 #     student_id = requested_id
    38 # else:
    39 #     student_id = member_id
    4023info = context.waeup_tool.getAccessInfo(context)
    4124student_id = info['student_id']
     
    4427
    4528
    46 #students_object = context.portal_url.getPortalObject().campus.students
    47 #student = getattr(students_object,student_id)
    4829
    4930res = context.students_catalog(id = student_id)
     
    5738info['is_online_pmt'] = io = payment.resp_code in ('00','AP','IP')
    5839info['is_scratchcard_pmt'] = isc =  payment.resp_code == 'SC'
    59 #set_trace()
    60 # if isc:
    61 #     p,b,n = str(payment.order_id).split('-')
    62 #     batch_object = getattr(context.pins,"%s_%s" % (p,b),None)
    63 #     if batch_object is None:
    64 #         info['cost'] = "unknown"
    65 #     else:
    66 #         cost = batch_object.getContent().cost
    67 #         info['cost'] = "%6.2f N" % cost
    68 #         #info['cost'] = "%6.2f N" % getattr(batch_object.getContent(),'cost',0.0)
    6940info['is_interrupted'] = ii = payment.resp_code == ''
    7041info['unknown_code'] = not (io or isc or ii)
  • WAeUP_SRP/base/skins/waeup_epayment/payment_receipt.pt

    r2891 r3280  
    2424        </tr>           
    2525        <tr>
     26          <td>Matriculation Number:</td>
     27          <td tal:content="student/matric_no" />
     28        </tr>             
     29        <tr>
    2630          <td>Certificate Id:</td>
    2731          <td tal:content="student/course" />
     
    4751        <h3>Scratch Card Payment Receipt</h3>
    4852        <br />
    49         <table tal:define="student info/student">
     53        <table tal:define="student info/student;
     54                           pm nocall: info/payment_doc">
     55       
    5056        <tr>
    5157          <td width="220px">Name:</td>
     
    7682          <td tal:content="student/department" />
    7783        </tr>             
    78         </table>                 
    79         <table tal:define="pm nocall: info/payment_doc">
     84
     85
     86        <tr>
     87          <td width="220px">Payment Status:</td>
     88          <td><span tal:content="python:context.portal_vocabularies.payment_status.get(pm.status)" /></td>
     89        </tr>   
    8090        <tr>
    8191          <td width="220px">Access Code:</td>
     
    8393        </tr>     
    8494        <tr>
    85           <td width="220px">Payment Description:</td>
    86           <td><span tal:content="pm/type_description" /></td>
    87         </tr>
     95          <td width="220px">Payment Type:</td>
     96         
     97          <td><span tal:content="python:context.portal_vocabularies.payment_types.get(pm.type)" /></td>
     98        </tr>   
    8899        <tr>
    89           <td width="220px">Amount (Naira):</td>
    90           <td><span tal:content="pm/amount" /></td>
    91         </tr>       
     100          <td width="220px">Payment Category:</td>
     101          <td><span tal:content="python:context.portal_vocabularies.payment_categories.get(pm.category)" /></td>
     102        </tr>   
     103        <tr>
     104          <td width="220px">Payment Item:</td>
     105          <td><span tal:content="pm/item" /></td>
     106        </tr>       
     107        <tr>
     108          <td width="220px">Session:</td>
     109          <td><span tal:content="pm/session" /></td>
     110        </tr>                   
     111     
    92112        <tr>       
    93113          <td width="220px">Transaction Date:</td>
    94114          <td><span tal:content="python:pm.date.ISO()" /></td>
    95115        </tr>       
     116        <tr>
     117          <td width="220px">Amount (Naira):</td>
     118          <td><span tal:content="pm/amount" /></td>
     119        </tr>   
    96120        <tr>
    97121          <td width="220px">Response Code:</td>
Note: See TracChangeset for help on using the changeset viewer.