- Timestamp:
- 22 Jun 2007, 07:44:54 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_epayment/getPaymentsFolderInfo.py
r1938 r1944 48 48 info = {} 49 49 is_so = info['is_so'] = context.isSectionOfficer() 50 info['query_url'] = "https://webpay.interswitchng.com/ TransactionQuery.aspx"50 info['query_url'] = "https://webpay.interswitchng.com/test_paydirect/services/TransactionQueryURL.aspx" 51 51 info['prod_id'] = '61' 52 52 #res = context.portal_catalog(portal_type='Student',id = student_id) … … 66 66 row['title'] = so.Title 67 67 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() 69 69 row['type'] = so.portal_type 70 70 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'): 72 72 row['is_approvable'] = is_so and (review_state == "opened") and info['review_state'] == 'cleared_and_validated' 73 73 else: 74 74 row['is_approvable'] = is_so and (review_state == "opened") 75 75 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: 80 81 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',): 86 90 row['confirmed'] = 'active' 87 91 else:
Note: See TracChangeset for help on using the changeset viewer.