Ignore:
Timestamp:
22 Jun 2007, 07:44:54 (17 years ago)
Author:
joachim
Message:

add searching for groups in member_search, interswitch payment updates

File:
1 edited

Legend:

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

    r1938 r1944  
    4848info = {}
    4949is_so = info['is_so'] = context.isSectionOfficer()
    50 info['query_url'] = "https://webpay.interswitchng.com/TransactionQuery.aspx"
     50info['query_url'] = "https://webpay.interswitchng.com/test_paydirect/services/TransactionQueryURL.aspx"
    5151info['prod_id'] = '61'
    5252#res = context.portal_catalog(portal_type='Student',id = student_id)
     
    6666    row['title'] = so.Title
    6767    url = row['url'] = "%s/%s" % (payments_path,so.getId)
    68     so_object = context.restrictedTraverse(url,default=None).getContent()
     68    so_doc = context.restrictedTraverse(url,default=None).getContent()
    6969    row['type'] = so.portal_type
    7070    review_state = row['review_state'] = so.review_state
    71     if so_object.type_description.startswith('School Fee'):
     71    if so_doc.type_description.startswith('School Fee'):
    7272        row['is_approvable'] = is_so and (review_state == "opened") and info['review_state'] == 'cleared_and_validated'
    7373    else:
    7474        row['is_approvable'] = is_so and (review_state == "opened")
    7575    row['is_requeryable'] = False
    76     if so_object.type_description.startswith('School Fee'):
    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'):
     76    #set_trace()
     77    row['resp_desc'] = getattr(so_doc,'resp_desc','no response')
     78    row['trans_ref'] = getattr(so_doc,'order_id','')
     79    if so_doc.type_description.startswith('School Fee'):
     80        if review_state == 'opened' and hasattr(so_doc, 'order_id') and not so_doc.resp_code:
    8081            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)
    85     if (review_state == "closed") and so_object.resp_code in ('SC','00','AP','IP',):
     82            row['callback_url'] = "%s/payments/%s/interswitch_cb" % (student.absolute_url(),
     83                                                            so.getId)
     84            href = '%(query_url)s' % info
     85            href += '?transRef=%(trans_ref)s' % row
     86            href += '&prodID=%(prod_id)s' % info
     87            href += '&redirectURL=%(callback_url)s' % row
     88            row['href'] = href
     89    if (review_state == "closed") and so_doc.resp_code in ('SC','00','AP','IP',):
    8690        row['confirmed'] = 'active'
    8791    else:
Note: See TracChangeset for help on using the changeset viewer.