Ignore:
Timestamp:
28 Jan 2007, 21:36:52 (18 years ago)
Author:
Henrik Bettermann
Message:

payment entries standardized

Location:
WAeUP_SRP/trunk/skins/waeup_epayment
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_epayment/fixScratchCardPayments.py

    r1370 r1371  
    1 ## Script (Python) "search_pins"
     1## Script (Python) "fixScratchCardPayments"
    22##bind container=container
    33##bind context=context
     
    2626payments = context.portal_catalog(portal_type='Payment')
    2727d = {}
     28list = []
    2829d['resp_code'] = "SC"
    29 d['resp_desc'] = "Scratchcard Payment"
    30 list = []
     30d['resp_desc'] = "SC Payment Successful"
    3131for brain in payments:
    3232    payment = brain.getObject()
    3333    pay_doc = payment.getContent()
    3434    if pay_doc.type_description.startswith('School Fee SC'):
     35        d['type_description'] = 'School Fee for Session 2006/2007'
    3536        pay_doc.edit(mapping=d)
    3637        list.append('%s changed' % pay_doc.type_description)
     38    elif pay_doc.type_description.startswith('Transfer Form SC'):
     39        d['type_description'] = 'Transfer Form for Session 2006/2007'
     40        d['type_code'] = pay_doc.type_code.replace('transfer_','')
     41        pay_doc.edit(mapping=d)
     42        list.append('%s changed' % pay_doc.type_description)   
    3743return '\n'.join(list)
  • WAeUP_SRP/trunk/skins/waeup_epayment/pay_by_sc.py

    r1370 r1371  
    7474pin = info['order_id'] = ds.get('pin')
    7575info['type_code'] = "%s" % pin
    76 info['type_description'] = 'School Fee SC %s' % pin
     76info['type_description'] = 'School Fee for Session 2006/2007'
    7777info['resp_code'] = "SC"
    78 info['resp_desc'] = "Scratchcard Payment"
     78info['resp_desc'] = "SC Payment Successful"
    7979payments.invokeFactory('Payment', p_id)
    8080payment = getattr(payments,p_id)
  • WAeUP_SRP/trunk/skins/waeup_epayment/payment_receipt.pt

    r1369 r1371  
    4848 
    4949
    50         <metal:block tal:condition="python:not info_doc['doc'].resp_code">           
     50        <metal:block tal:condition="python:info_doc['doc'].resp_code=='SC'">           
    5151        <h3>Scratch Card Payment Receipt</h3>
    5252        <br />
     
    7979        <table tal:define="pm python:info_doc['doc']">
    8080        <tr>
     81          <td width="220px">Access Code:</td>
     82          <td><span tal:content="pm/type_code" /></td>
     83        </tr>     
     84        <tr>
    8185          <td width="220px">Payment Description:</td>
    8286          <td><span tal:content="pm/type_description" /></td>
    83         </tr>         
    84         <tr>
     87        </tr>
     88        <tr>       
    8589          <td width="220px">Transaction Date:</td>
    8690          <td><span tal:content="python:pm.date.ISO()" /></td>
    87         </tr>                   
     91        </tr>       
     92        <tr>
     93          <td width="220px">Response Code:</td>
     94          <td><span tal:content="pm/resp_code" /></td>
     95        </tr>         
     96        <tr>
     97          <td width="220px">Response Description:</td>
     98          <td><span tal:content="pm/resp_desc" /></td>
     99        </tr>             
    88100        </table>
    89101        </metal:block>
    90102
    91 
     103        <metal:block tal:condition="python:not info_doc['doc'].resp_code">           
     104        <h3>Payment Process Interrupted!</h3>
     105        <br />       
     106        </metal:block>
    92107
    93108
Note: See TracChangeset for help on using the changeset viewer.