Ignore:
Timestamp:
8 Jan 2007, 17:39:17 (18 years ago)
Author:
joachim
Message:

more fixes

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

Legend:

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

    r1229 r1243  
    3737              )
    3838pd = {}
    39 from Products.zdb import set_trace;set_trace()
     39#from Products.zdb import set_trace;set_trace()
    4040for rc,pdk in resp_codes:
    4141    pd[pdk] = request.get(rc)
  • WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py

    r1235 r1243  
    2424student = getattr(students,student_id)
    2525sbrain = context.students_catalog(id=student_id)[0]
    26 res = context.portal_catalog(portal_type="Certificate",
    27                                      id = sbrain.course)
    28 if not res:
    29     logger.info('"%s","certificate not found", "%s"' % (student_id,course))
    30     sfc = "ART"
    31 else:   
    32     sfc = res[0].getPath().split('/')[-4]
     26amount,description = context.getSchoolFee(sbrain.faculty)
     27##res = context.portal_catalog(portal_type="Certificate",
     28##                                     id = sbrain.course)
     29##
     30##if not res:
     31##    logger.info('"%s","certificate not found", "%s"' % (student_id,course))
     32##    sfc = "ART"
     33##else:   
     34##    sfc = res[0].getPath().split('/')[-4]
    3335info = {}
    34 info['amount'] = "75000"
    35 info['type_code'] = sfc
    36 info['type_description'] = "Schoolfee %s for 2006/2007 Session" % sfc
     36info['amount'] = amount
     37info['type_code'] = sbrain.faculty
     38info['type_description'] = description
    3739info['pay_bill_to'] = sbrain.name
    3840info['pay_ship_to'] = "University of Benin"
     
    4143info['student_email'] = sbrain.email
    4244now = DateTime.DateTime()
    43 info['pay_date'] = now.strftime("%d%m%y%H%M%S")
     45info['date'] = now
    4446order_id = info['order_id'] = "%d" % int(now.timeTime()*1000)
    4547info['order_id'] = "%s%s" % (student_id[1:],order_id)
     
    4850    payments = getattr(student,'payments')
    4951    d = {}
    50     d['Title'] = 'Online Payments'
     52    d['Title'] = 'Payments'
    5153    payments.getContent().edit(mapping=d)
     54    wftool.doActionFor(payments,'open')
    5255else:
    5356    payments = getattr(student,'payments')
    5457p_id = "p%s" % order_id
    5558payments.invokeFactory('Payment', p_id)
    56 #from Products.zdb import set_trace;set_trace()
    5759payment = getattr(payments,p_id)
    5860d = {}
    5961d.update(info)
    60 d['Title'] = "%(type_description)s %(pay_date) %(amount)s N" % info
     62#from Products.zdb import set_trace;set_trace()
    6163payment.getContent().edit(mapping=d)
    6264info['callback_url'] = "%s/payments/%s/epayment_cb" % (student.absolute_url(),p_id)
    63 if context.portal_url().find('uniben-demo.waeup.org') >-1:
     65if context.portal_url().find('uniben-demo.waeup.org') >-1 or\
     66   context.portal_url().find('uniben.waeup.org') >-1:
    6467    info['action'] = "http://www.wemaonlinepayments.biz/payment.aspx"
    6568else:
  • WAeUP_SRP/trunk/skins/waeup_epayment/payments_view.pt

    r1238 r1243  
    2323      </metal:block>
    2424      <metal:main fill-slot="main">
    25         <table class="contentListing" width="100%">     
     25        <div>
     26          <a href="" tal:attributes="href string:${context/absolute_url}/pay_online">Pay Your Schoolfee online</a>
     27        </div>
     28        <table class="contentListing" width="100%">
    2629          <tr tal:repeat="row rows"
    2730              tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
  • WAeUP_SRP/trunk/skins/waeup_epayment/simulate_callback.py

    r1235 r1243  
    1616args['x_RespCode'] = '00'
    1717args['x_CardNum'] = '0114'
    18 args['x_ApprAmt'] = '75000.00'
     18args['x_ApprAmt'] = REQUEST.get('x_amt')
    1919
    2020from urllib import urlencode
  • WAeUP_SRP/trunk/skins/waeup_epayment/wema_form.pt

    r1235 r1243  
    4848            Amount:
    4949            </td>
    50             <td> Naira <span tal:content="info/amount" /></td>
     50            <td> Naira <span tal:content="info/amount" />.00</td>
    5151          </tr>
    5252        </table>
Note: See TracChangeset for help on using the changeset viewer.