Changeset 2891 for WAeUP_SRP/base
- Timestamp:
- 9 Dec 2007, 11:03:55 (17 years ago)
- Location:
- WAeUP_SRP/base
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/Payment.py
r2874 r2891 43 43 d['key'] = payment.getId() 44 44 d['amount'] = doc.amount 45 d[' description'] = d['type_description'] = doc.type_description45 d['type_description'] = doc.type_description 46 46 subject = '' 47 47 if doc.type_description.startswith('School'): … … 55 55 p_status = "paid" 56 56 break 57 if doc.resp_code in ("00","IP" ):57 if doc.resp_code in ("00","IP","AP"): 58 58 p_type = "online" 59 59 p_status = "paid" … … 64 64 d['key'] = payment.getId() 65 65 d['type'] = p_type # scratch card 66 d[' target'] = student_record.course66 d['item'] = student_record.course 67 67 d['status'] = p_status 68 68 d['resp_approved_amount'] = getattr(doc,'resp_approved_amount',None) … … 73 73 d['resp_card_num'] = doc.resp_card_num 74 74 d['date'] = getattr(doc,'date',None) 75 d['resp_date'] = getattr(doc,'resp_date',None)75 #d['resp_date'] = getattr(doc,'resp_date',None) 76 76 # msg = " ".join(["%s: %s" % (key,value) for key,value in d.items()]) 77 77 # logger.info(msg) 78 78 79 79 review_state = wftool.getInfoFor(payment,'review_state',None) 80 80 if review_state == "closed": -
WAeUP_SRP/base/skins/waeup_epayment/interswitch_acco_cb.py
r2857 r2891 53 53 for rc,pdk in resp_codes: 54 54 pd[pdk] = request.get(rc,'') 55 56 57 ## for testing purposes 58 pd['resp_desc'] = 'Simulated Callback' 59 pd['resp_pay_reference'] = 'XXXX' 60 pd['resp_code'] = '00' 61 pd['resp_card_num'] = '0000' 62 pd['resp_approved_amount'] = '10000' 55 63 56 64 if pd['resp_code'] == '00' and len(pd['resp_approved_amount']) > 4: 57 65 pd['resp_approved_amount'] = pd['resp_approved_amount'][:-2] 66 pd['status'] = 'paid' 58 67 else: 59 68 pd['resp_approved_amount'] = '0' 69 pd['status'] = 'failed' 60 70 61 71 review_state = wftool.getInfoFor(context,'review_state',None) … … 86 96 else: 87 97 logger.info('%s received unsuccessfull callback: %s' % (student_id,pd['resp_desc'])) 98 99 try: 100 wftool.doActionFor(context,'close') 101 except: 102 logger.info('%s no workflow action close' % student_id) 88 103 try: 89 104 wftool.doActionFor(acco_info['acco'],'pay_maintenance_fee',dest_container=acco_info['acco']) … … 92 107 logger.info('%s no workflow action pay_maintainance_fee' % student_id) 93 108 return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url()) 94 95 else: 109 110 111 else: 96 112 next_info = context.getNextInfo(s_brain) 97 113 next_session_id = next_info['next_session_id'] … … 101 117 next_verdict = next_info['next_verdict'] 102 118 next_previous_verdict = next_info['next_previous_verdict'] 103 119 104 120 if resp == '00': 105 121 if context.getStudentReviewState() == "school_fee_paid": … … 121 137 if next_transition: 122 138 wftool.doActionFor(student,next_transition) 123 139 124 140 logger.info('%s received valid callback' % student_id) 125 141 referer = request.get('HTTP_REFERER','none') … … 133 149 except: 134 150 logger.info('%s no workflow action close' % student_id) 135 136 151 152 -
WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py
r2881 r2891 106 106 info['status'] = 'paid' 107 107 info['session_id'] = student_record.session 108 info[' target'] = student_record.course109 info[' subject'] = 'schoolfee'108 info['item'] = student_record.course 109 info['category'] = 'schoolfee' 110 110 info['resp_code'] = "SC" 111 111 info['resp_desc'] = "SC Payment Successful" -
WAeUP_SRP/base/skins/waeup_epayment/pay_interswitch_acco.py
r2877 r2891 19 19 from urllib import urlencode 20 20 import logging 21 logger = logging.getLogger('Skins.pay_interswitch ')21 logger = logging.getLogger('Skins.pay_interswitch_acco') 22 22 import DateTime 23 23 … … 75 75 info['student_id'] = student_id 76 76 info['student_name'] = student_record.name 77 info['session_id'] = student_record.session 77 78 info['student_email'] = student_record.email 78 79 info['date'] = now … … 105 106 payment_id) 106 107 107 logger.info('%(student_id)s initiated %( description)s payment with order_id %(order_id)s and callback url %(callback_url)s' % info)108 logger.info('%(student_id)s initiated %(type_description)s payment with order_id %(order_id)s and callback url %(callback_url)s' % info) 108 109 payment_fields = (('product_id','site_id'), 109 110 ('site_name','site_name'), -
WAeUP_SRP/base/skins/waeup_epayment/payment_receipt.pt
r2885 r2891 20 20 </tr> 21 21 <tr> 22 <td> JAMBRegistration Number:</td>22 <td>Registration Number:</td> 23 23 <td tal:content="student/jamb_reg_no" /> 24 24 </tr> -
WAeUP_SRP/base/skins/waeup_epayment/simulate_callback.py
r2857 r2891 13 13 current = DateTime.DateTime() 14 14 pr = context.portal_registration 15 logger = logging.getLogger(' EPayment.Simulate')15 logger = logging.getLogger('Skins.simulate_callback') 16 16 17 17 args = {} … … 24 24 #set_trace() 25 25 #url = "%s" % (context.absolute_url()) 26 raw_url = REQUEST.get("site_redirect_url") 26 raw_url = REQUEST.get("site_redirect_url") 27 27 url = "%s&%s" % (raw_url,urlencode(args)) 28 28 return REQUEST.RESPONSE.redirect(url) -
WAeUP_SRP/base/skins/waeup_layout/layout_student_acco_edit.pt
r2243 r2891 16 16 apply request/apply_button|nothing; 17 17 widgets python:context.getRenderedWidgets(layout); 18 info python: context.getAccommodationInfo(); 19 maintenance_online info/online_payment|nothing; 20 21 22 23 18 24 "> 19 25 <form action="" id="editForm" method="post" … … 44 50 tal:attributes="for cell/widget_input_area_id|nothing;">label</label>: 45 51 </div> 46 <button type="button" class="tooltipControl"47 tal:condition="widget/help"48 tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>49 52 </td> 50 53 <td> … … 52 55 <div tal:replace="structure cell/widget_rendered"/> 53 56 </span> 54 <div class="tooltipArea" style="visibility: hidden;"55 tal:condition="widget/help"56 tal:attributes="id tooltip_id;57 onclick python:'showElement(false, \'%s\')' % tooltip_id;"58 >59 <tal:block tal:content="widget/help">This is the help for this field60 </tal:block>61 </div>62 <tal:block condition="err">63 <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">64 <br /><em style="color: red"65 tal:content="msg">err</em>66 </tal:block>67 </tal:block>68 57 </td> 69 58 </div> … … 91 80 tal:attributes="for cell/widget_input_area_id|nothing;">label</label>: 92 81 </div> 93 <button type="button" class="tooltipControl"94 tal:condition="widget/help"95 tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>96 82 </td> 97 83 <td> … … 99 85 <div tal:replace="structure cell/widget_rendered"/> 100 86 </span> 101 <div class="tooltipArea" style="visibility: hidden;"102 tal:condition="widget/help"103 tal:attributes="id tooltip_id;104 onclick python:'showElement(false, \'%s\')' % tooltip_id;"105 >106 <tal:block tal:content="widget/help">This is the help for this field107 </tal:block>108 </div>109 <tal:block condition="err">110 <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">111 <br /><em style="color: red"112 tal:content="msg">err</em>113 </tal:block>114 </tal:block>115 87 </td> 116 88 </div> … … 122 94 value="Save" 123 95 id="cpsdocument_edit_button" 124 tal:condition="not:creation" /> 125 <input type="submit" class="standalone" name="apply_admission" 126 value="apply for admission" 127 id="cpsdocument_edit_and_view_button" 128 tal:condition="apply" 129 tal:attributes="value apply"/> 130 <input type="submit" 131 class="standalone" 132 name="cpsdocument_create_button" 133 value="apply" 134 tal:attributes="value options/button" 135 tal:condition="creation" /> 96 tal:condition="python:not creation and not maintenance_online" /> 136 97 137 98 </form> -
WAeUP_SRP/base/skins/waeup_student/accommodation_edit_form.pt
r2889 r2891 3 3 data_storage options/ds|nothing; 4 4 mode options/mode; 5 edition python:1;" 5 edition python:1; 6 info python: context.getAccommodationInfo(); 7 maintenance_online info/online_payment|nothing" 6 8 > 7 9 <metal:block define-macro="edit_form"> … … 27 29 <br /> 28 30 <div tal:replace="structure rendered_main" /> 29 <p>Instructions :</p> 30 <ul tal:condition="python: mode == 'create'"> 31 <li>Buy a Hostel Application Scratch Card.</li> 31 32 <p tal:condition="not: maintenance_online">Instructions :</p> 33 34 <ul tal:condition="python: mode == 'create' and not maintenance_online"> 35 <li>Buy a Hostel Application Scratch Card.</li> 32 36 <li>Enter the PIN above and press 'Book'.</li> 33 37 <li>Print your Hostel Allocation Slip.</li> 34 </ul> 35 <tal:block condition="python: mode == 'edit'" 36 tal:define="info python: context.getAccommodationInfo(); 37 maintenance_online info/online_payment|nothing" 38 > 39 <ul tal:condition="not: maintenance_online" tal:omit-tag=""> 40 <li>Buy a Hostel Maintainance Scratch Card 41 (Code: <span tal:replace="python: info['acco_doc'].acco_maint_code" />) for 42 <span tal:replace="python: info['acco_doc'].acco_maint_fee" /> Nairas</li> 43 <li>Enter the PIN above and press 'Save'.</li> 44 <li>Print your Hostel Maintenance Receipt.</li> 45 </ul> 38 </ul> 39 40 <tal:block condition="python: mode == 'edit'" > 41 42 <ul tal:condition="not: maintenance_online" tal:omit-tag=""> 43 <li>Buy a Hostel Maintainance Scratch Card 44 (Code: <span tal:replace="python: info['acco_doc'].acco_maint_code" />) for 45 <span tal:replace="python: info['acco_doc'].acco_maint_fee" /> Nairas</li> 46 <li>Enter the PIN above and press 'Save'.</li> 47 <li>Print your Hostel Maintenance Receipt.</li> 48 </ul> 49 50 46 51 <tal:block condition="maintenance_online"> 47 52 <table tal:condition="not: info/maintenance_paid">
Note: See TracChangeset for help on using the changeset viewer.