Changeset 2058


Ignore:
Timestamp:
26 Jul 2007, 11:03:52 (17 years ago)
Author:
joachim
Message:

payment_receipt should now work in all cases.

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

Legend:

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

    r2051 r2058  
    5050info['student'] = context.getFormattedStudentEntry(sbrain)
    5151payment = context.getContent()
    52 info['payment'] = payment
     52info['payment_doc'] = payment
    5353info['is_online_pmt'] = io = payment.resp_code in ('00','AP','IP')
    5454info['is_scratchcard_pmt'] = isc =  payment.resp_code == 'SC'
    55 if isc:
    56     p,b,n = str(payment.order_id).split('-')
    57     batch_object = getattr(context.pins,"%s_%s" % (p,b),None)
    58     #set_trace()
    59     if True or batch_object is None:
    60         info['cost'] = "unknown"
    61     else:
    62         cost = batch_object.getContent().cost
    63         info['cost'] = "%6.2f N" % cost
    64         #info['cost'] = "%6.2f N" % getattr(batch_object.getContent(),'cost',0.0)
     55#set_trace()
     56# if isc:
     57#     p,b,n = str(payment.order_id).split('-')
     58#     batch_object = getattr(context.pins,"%s_%s" % (p,b),None)
     59#     if batch_object is None:
     60#         info['cost'] = "unknown"
     61#     else:
     62#         cost = batch_object.getContent().cost
     63#         info['cost'] = "%6.2f N" % cost
     64#         #info['cost'] = "%6.2f N" % getattr(batch_object.getContent(),'cost',0.0)
    6565info['is_interrupted'] = ii = payment.resp_code == ''
    6666info['unknown_code'] = not (io or isc or ii)
  • WAeUP_SRP/trunk/skins/waeup_epayment/payment_receipt.pt

    r2048 r2058  
    3737        </table>                 
    3838        <span tal:omit-tag=""
    39               tal:content="structure python: info_doc['doc'].render(layout_mode='view')"
     39              tal:content="structure python: info['payment_doc'].render(layout_mode='view')"
    4040              />
    4141        </metal:block>
     
    7373        </tr>             
    7474        </table>                 
    75         <table tal:define="pm nocall: info/payment">
     75        <table tal:define="pm nocall: info/payment_doc">
    7676        <tr>
    7777          <td width="220px">Access Code:</td>
Note: See TracChangeset for help on using the changeset viewer.