Changeset 1938


Ignore:
Timestamp:
19 Jun 2007, 17:28:07 (17 years ago)
Author:
joachim
Message:

missing for epayment

File:
1 edited

Legend:

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

    r1847 r1938  
    4040if student_id is None:
    4141    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
    42 #student = getattr(students,student_id)
     42student = getattr(students,student_id)
    4343s_brain = context.students_catalog(id = student_id)[0]
    4444
     
    4848info = {}
    4949is_so = info['is_so'] = context.isSectionOfficer()
    50 
     50info['query_url'] = "https://webpay.interswitchng.com/TransactionQuery.aspx"
     51info['prod_id'] = '61'
    5152#res = context.portal_catalog(portal_type='Student',id = student_id)
    5253#res = context.students_catalog(id = student_id)
     
    6162
    6263for so in sos:
    63 
    6464    row = {}
    6565    row['id'] = so.getId
     
    7373    else:
    7474        row['is_approvable'] = is_so and (review_state == "opened")
     75    row['is_requeryable'] = False
    7576    if so_object.type_description.startswith('School Fee'):
    76         row['is_requeryable'] = (review_state == "opened") and info['review_state'] == 'cleared_and_validated'
    77     else:
    78         row['is_requeryable'] = is_so and (review_state == "opened")
     77        if (review_state == "opened") and\
     78           info['review_state'] == 'cleared_and_validated' and\
     79           not hasattr(so,'resp_code') and hasattr(so, 'order_id'):
     80            row['is_requeryable'] = True
     81            row['trans_ref'] = getattr(so,'order_id')
     82            row['callback_url'] = "%s/payments/p%s/interswitch_cb?echo=p%s" % (student.absolute_url(),
     83                                                                  so.order_id,
     84                                                                  so.order_id)
    7985    if (review_state == "closed") and so_object.resp_code in ('SC','00','AP','IP',):
    8086        row['confirmed'] = 'active'
Note: See TracChangeset for help on using the changeset viewer.