Changeset 1653 for WAeUP_SRP/branches/uli/skins/waeup_epayment
- Timestamp:
- 28 Mar 2007, 02:35:25 (18 years ago)
- Location:
- WAeUP_SRP/branches/uli/skins/waeup_epayment
- Files:
-
- 5 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/branches/uli/skins/waeup_epayment/epayment_cb.py
r1593 r1653 14 14 import logging 15 15 logger = logging.getLogger('Skins.epayment_cb') 16 from AccessControl import Unauthorized 16 17 import DateTime 17 18 if context.portal_membership.isAnonymousUser(): … … 21 22 students = context.portal_url.getPortalObject().campus.students 22 23 wftool = context.portal_workflow 24 mtool = context.portal_membership 25 member = mtool.getAuthenticatedMember() 26 member_id = str(member) 23 27 student_id = context.getStudentId() 24 if student_id is None: 28 if student_id is None or student_id != member_id: 29 logger.info('%s tried to access payment object of %s' % (member_id,student_id)) 30 referer = request.get('HTTP_REFERER','none') 31 logger.info('%s:%s illegal access, referer = %s' % (member_id,student_id,referer)) 32 real_ip = request.get('HTTP_X_REAL_IP',"none") 33 logger.info('%s:%s illegal access, real_x_ip = %s' % (member_id,student_id,real_ip)) 25 34 return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 26 35 … … 37 46 for rc,pdk in resp_codes: 38 47 pd[pdk] = request.get(rc) 39 context.getContent().edit(mapping=pd) 48 try: 49 context.getContent().edit(mapping=pd) 50 except UnAuthorized,E: 51 logger.info('%s ' % student_id) 52 40 53 #resp = pd['resp_desc'] 41 54 #if resp.startswith('Appro') and resp.endswith('essful'): … … 44 57 wftool.doActionFor(student,'pay_school_fee') 45 58 logger.info('%s received valid callback' % student_id) 59 referer = request.get('HTTP_REFERER','none') 60 logger.info('%s valid callback referer = %s' % (student_id,referer)) 61 real_ip = request.get('HTTP_X_REAL_IP',"none") 62 logger.info('%s valid callback real_ip = %s' % (student_id,real_ip)) 46 63 47 64 elif len(resp) < 3: -
WAeUP_SRP/branches/uli/skins/waeup_epayment/getPaymentsFolderInfo.py
r1593 r1653 53 53 else: 54 54 row['is_approvable'] = is_so and (review_state == "opened") 55 if (review_state == "closed") and so_object.resp_code in ('SC','00','AP',): 55 if so_object.type_description.startswith('School Fee'): 56 row['is_requeryable'] = (review_state == "opened") and info['review_state'] == 'cleared_and_validated' 57 else: 58 row['is_requeryable'] = is_so and (review_state == "opened") 59 if (review_state == "closed") and so_object.resp_code in ('SC','00','AP','IP',): 56 60 row['confirmed'] = 'active' 57 61 else: -
WAeUP_SRP/branches/uli/skins/waeup_epayment/pay_online.py
r1593 r1653 91 91 info['callback_url'] = "%s/payments/%s/epayment_cb" % (student.absolute_url(),p_id) 92 92 93 logger.info('%(student_id)s initiated online school fee payment ' % info)93 logger.info('%(student_id)s initiated online school fee payment with order_id %(order_id)s and callback url %(callback_url)s' % info) 94 94 payment_fields = (('x_SiteID','site_id'), 95 95 ('x_Redirect_url','callback_url'), -
WAeUP_SRP/branches/uli/skins/waeup_epayment/payment_receipt.pt
r1427 r1653 8 8 <span tal:condition="info"> 9 9 10 <metal:block tal:condition="python:info_doc['doc'].resp_code in ('00','AP', )">10 <metal:block tal:condition="python:info_doc['doc'].resp_code in ('00','AP','IP')"> 11 11 <h3>Online Payment Receipt</h3> 12 12 <br /> … … 106 106 </metal:block> 107 107 108 <metal:block tal:condition="python:info_doc['doc'].resp_code not in ('SC','00','AP',' ')">108 <metal:block tal:condition="python:info_doc['doc'].resp_code not in ('SC','00','AP','IP','')"> 109 109 <h3>Response from Bank: "<span tal:content="python:info_doc['doc'].resp_desc" />"</h3> 110 110 <br /> -
WAeUP_SRP/branches/uli/skins/waeup_epayment/payments_view.pt
r1431 r1653 34 34 </td> 35 35 <td> 36 <a tal:condition=" python:row['is_approvable']"36 <a tal:condition="row/is_approvable" 37 37 tal:attributes="href string:${context/absolute_url}/${row/id}/approve_epayment; 38 38 onclick python:'return window.confirm(\'%s\')' %(cpsmcat('Are you sure? You will not be able to undo the approval.'), ); 39 39 "> 40 40 [approve payment] 41 </a> 42 </td> 43 <td tal:condition="nothing"> 44 <a tal:condition="row/is_requeryable" 45 tal:attributes="href string:${context/absolute_url}/${row/id}/requery_payment; 46 onclick python:'return window.confirm(\'%s\')' %(cpsmcat('Are you sure? You will not be able to undo the approval.'), ); 47 "> 48 [requery payment] 41 49 </a> 42 50 </td> … … 53 61 value="Initiate School Fee Online Payment" 54 62 /> 63 64 65 66 55 67 </form> 56 68
Note: See TracChangeset for help on using the changeset viewer.