Changeset 1944
- Timestamp:
- 22 Jun 2007, 07:44:54 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/profiles/default/layouts/members_search.xml
r1449 r1944 44 44 <property name="is_i18n">True</property> 45 45 </widget> 46 <table> 46 <widget name="groups" meta_type="MultiSelect Widget"> 47 <property name="title">Groups</property> 48 <property name="fields"> 49 <element value="groups"/> 50 </property> 51 <property name="label">Groups</property> 52 <property name="label_edit">Groups</property> 53 <property name="readonly_layout_modes"/> 54 <property name="hidden_layout_modes"/> 55 <property name="hidden_readonly_layout_modes"/> 56 <property name="vocabulary">groups_voc</property> 57 </widget> 58 <table> 47 59 <row> 48 60 <cell name="id" ncols="2"/> -
WAeUP_SRP/trunk/profiles/default/schemas.xml
r1756 r1944 13 13 <object name="faculty" meta_type="CPS Schema"/> 14 14 <object name="members" meta_type="CPS Schema"/> 15 <object name="members_search" meta_type="CPS Schema"/> 15 16 <object name="payment" meta_type="CPS Schema"/> 16 17 <object name="student" meta_type="CPS Schema"/> -
WAeUP_SRP/trunk/profiles/default/vocabularies.xml
r1796 r1944 15 15 <object name="get_departments_voc" meta_type="CPS Method Vocabulary"/> 16 16 <object name="get_faculties_voc" meta_type="CPS Method Vocabulary"/> 17 <object name="groups_voc" meta_type="CPS Method Vocabulary"/> 17 18 <object name="waeup_bed_letters" meta_type="CPS Vocabulary"/> 18 19 <object name="waeup_block_letters" meta_type="CPS Vocabulary"/> -
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: -
WAeUP_SRP/trunk/skins/waeup_epayment/interswitch_cb.py
r1937 r1944 40 40 41 41 student = getattr(students,student_id) 42 43 42 resp_codes = (("desc","resp_desc"), 44 43 ("resp","resp_code"), 45 ("txn ref","pay_reference"),46 ("payRe t","resp_pay_reference"),44 ("txnRef","pay_reference"), 45 ("payRef","resp_pay_reference"), 47 46 ("retRef","retRef"), 48 (" CardNum","resp_card_num"),47 ("cardNum","resp_card_num"), 49 48 ("apprAmt","resp_approved_amount"), 50 49 ) 51 50 pd = {} 52 #from Products.zdb import set_trace;set_trace()53 51 for rc,pdk in resp_codes: 54 52 pd[pdk] = request.get(rc,'') … … 57 55 else: 58 56 pd['resp_approved_amount'] = '0' 59 try: 60 context.getContent().edit(mapping=pd)61 except UnAuthorized,E:62 logger.info('%s ' % student_id)63 64 #resp = pd['resp_desc'] 65 #if resp.startswith('Appro') and resp.endswith('essful'): 57 58 review_state = wftool.getInfoFor(context,'review_state',None) 59 if pd['resp_code'] == '' and review_state == 'opened': 60 logger.info('%s requeried payment %s and got empty response' % (student_id,context.getId())) 61 wftool.doActionFor(context,'close') 62 return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url()) 63 context.getContent().edit(mapping = pd) 66 64 resp = pd['resp_code'] 67 65 if resp == '00': -
WAeUP_SRP/trunk/skins/waeup_epayment/pay_interswitch.py
r1937 r1944 134 134 args['pay_item_id'] = "6100" 135 135 args['pay_item_name'] = "UNIBEN Tuition Payments" 136 args['payment_params'] = 'college_split' 137 args['xml_data'] = xmltext % info 136 args['payment_params'] = 'switch_college_split' 137 #args['xml_data'] = xmltext % info 138 args['xml_data'] = '' 138 139 info['args'] = args 139 140 return context.goto_interswitch_form(info=info) 140 url = info['action'] + "?" + urlencode(args)141 request.RESPONSE.redirect(url) -
WAeUP_SRP/trunk/skins/waeup_epayment/payments_view.pt
r1937 r1944 31 31 <tr tal:repeat="row rows" 32 32 tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')"> 33 34 33 <td tal:attributes="class string:${row/confirmed}"> 35 34 <a target="slip" href="" tal:attributes="href string:${context/absolute_url}/${row/id}/payment_receipt" … … 37 36 <strong tal:content="row/title" /></a> 38 37 </td> 38 <td tal:content="row/resp_desc" /> 39 <td tal:content="row/trans_ref" /> 39 40 <td> 40 41 <a tal:condition="row/is_approvable" … … 45 46 </a> 46 47 </td> 47 <td tal:condition=" python:1">48 <a tal:condition=" row/is_requeryable"49 tal:attributes="href string:${info/query_url}?transRef=${row/trans_ref}&prodID=${info/prod_id}&${row/callback_url};50 onclick python:'return window.confirm(\'%s\')' %(cpsmcat('Are you sure? You will not be able to undo the approval.'), );48 <td tal:condition="row/is_requeryable"> 49 <a tal:condition="python:1" 50 tal:attributes="href row/href; 51 onclick python:'return window.confirm(\'%s\')' %(cpsmcat('Are you sure?'), ); 51 52 "> 52 53 [requery payment]
Note: See TracChangeset for help on using the changeset viewer.