- Timestamp:
- 23 Aug 2007, 10:31:35 (17 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_epayment
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_epayment/getPaymentsFolderInfo.py
r1952 r2151 48 48 info = {} 49 49 is_so = info['is_so'] = context.isSectionOfficer() 50 is_student = info['is_student'] = context.isStudent() 51 info['student_name'] = s_brain.name 50 52 info['query_url'] = "https://webpay.interswitchng.com/paydirect/services/TransactionQueryURL.aspx" 51 info['prod_id'] = '61' 52 #res = context.portal_catalog(portal_type='Student',id = student_id) 53 #res = context.students_catalog(id = student_id) 54 info['review_state'] = s_brain.review_state 53 review_state = info['review_state'] = s_brain.review_state 54 if s_brain.mode.endswith('_ft'): 55 online_payment = True 56 else: 57 online_payment = review_state == 'cleared_and_validated' 58 info['online_payment'] = online_payment 55 59 session = s_brain.session 56 60 info['next_session'], info['next_session_str'] = context.getNextSessionId(session) -
WAeUP_SRP/trunk/skins/waeup_epayment/getSchoolFee.py
r1994 r2151 5 5 ##bind script=script 6 6 ##bind subpath=traverse_subpath 7 ##parameters= faculty=None, session=None7 ##parameters=brain=None 8 8 ##title= 9 9 ## … … 27 27 '06': ('22200','23700'), 28 28 } 29 pt_fees = { 30 "DIF": {'new': "32200", 31 'returning': "17700", 32 'description': 'Diploma in French'}, 33 "DTA": {'new':"34200", 34 'returning':"19700", 35 'description': 'Diploma in Theatre Arts'}, 36 "DISD": {'new':"42200", 37 'returning':"27700", 38 'description': 'Diploma in International Studies'}, 39 "DFA": {'new':"34200", 40 'returning':"19700", 41 'description': 'Diploma in Fine & Applied Arts'}, 42 "DAE": {'new':"41700", 43 'returning':"25700", 44 'description': 'Diploma in Agric Economics'}, 45 "DFS": {'new':"38700", 46 'returning':"22700", 47 'description': 'Diploma in Fishery, Forestry & Wild Life'}, 48 "DFBS": {'new':"38700", 49 'returning':"22700", 50 'description': 'Diploma in Food & Breweries'}, 51 "DIA": {'new':"42200", 52 'returning':"27700", 53 'description': 'Diploma in Accounting'}, 54 "DBF": {'new':"42200", 55 'returning':"27700", 56 'description': 'Diploma in Banking & Finance'}, 57 "DAIC": {'new':"38700", 58 'returning':"22700", 59 'description': 'Diploma in Applied Industrial Chemistry'}, 60 "DAM": {'new':"38700", 61 'returning':"22700", 62 'description': 'Diploma in Applied Microbiology'}, 63 "DIG": {'new':"41700", 64 'returning':"25700", 65 'description': 'Diploma in Geology'}, 66 "DSLT": {'new':"41700", 67 'returning':"25700", 68 'description': 'Diploma in Science Laboratory Technology'}, 69 "DICE": {'new':"43700", 70 'returning':"27700", 71 'description': 'Diploma in Computer Engineering'}, 72 "DICHE": {'new':"43700", 73 'returning':"27700", 74 'description': 'Diploma in Chemical Engineering'}, 75 "DDP": {'new':"43700", 76 'returning':"27700", 77 'description': 'Diploma in Data Processing'}, 78 "DCG": {'new':"34200", 79 'returning':"19700", 80 'description': 'Diploma in Cartography'}, 81 "DSW": {'new':"40200", 82 'returning':"25700", 83 'description': 'Diploma in Social Works'}, 84 "DIL": {'new':"42200", 85 'returning':"27700", 86 'description': 'Diploma in Law'}, 87 "DHT": {'new':"42200", 88 'returning':"27700", 89 'description': 'Diploma in Recreation, Hotel & Tourism Mgt.'}, 90 "DEC": {'new':"36200", 91 'returning':"21200", 92 'description': 'Certificate in Early Child Health & Dev.'}, 93 "DLS": {'new':"37200", 94 'returning':"24200", 95 'description': 'Diploma in Library & Information Science'}, 96 "BFA": {'new':"42200", 97 'returning':"27700", 98 'description': 'Bachelor in Fine & Applied Arts'}, 99 "BTA": {'new':"42200", 100 'returning':"27700", 101 'description': 'Bachelor in Theatre Arts'}, 102 "BEL": {'new':"42200", 103 'returning':"27700", 104 'description': 'Bachelor in English'}, 105 "BFR": {'new':"42200", 106 'returning':"27700", 107 'description': 'Bachelor in French'}, 108 "BISD": {'new':"42200", 109 'returning':"27700", 110 'description': 'Bachelor in International Std. & Diplomacy'}, 111 "BAE": {'new':"48700", 112 'returning':"32700", 113 'description': 'Bachelor in Agric Econs'}, 114 "BAN": {'new':"43700", 115 'returning':"27700", 116 'description': 'Bachelor in Animal Science'}, 117 "BAC": {'new':"43700", 118 'returning':"27700", 119 'description': 'Bachelor in Crop Science'}, 120 "BAS": {'new':"43700", 121 'returning':"27700", 122 'description': 'Bachelor in Soil Science'}, 123 "BIA": {'new':"47200", 124 'returning':"32700", 125 'description': 'Bachelor in Accounting'}, 126 "BBF": {'new':"47200", 127 'returning':"32700", 128 'description': 'Bachelor in Banking & Finance'}, 129 "BLG": {'new':"37200", 130 'returning':"22700", 131 'description': 'Bachelor in Local Goverment'}, 132 "BPA": {'new':"47200", 133 'returning':"32700", 134 'description': 'Bachelor in Public Admin'}, 135 "BSW": {'new':"42200", 136 'returning':"27700", 137 'description': 'Bachelor in Social Works'}, 138 "BES": {'new':"43700", 139 'returning':"27700", 140 'description': 'Bachelor in Environmental Science'}, 141 "BSLT": {'new':"43700", 142 'returning':"27700", 143 'description': 'Bachelor in Science Lab Technology'}, 144 "BIP": {'new':"43700", 145 'returning':"27700", 146 'description': 'Bachelor in Industrial Physics'}, 147 "BSCS": {'new':"45700", 148 'returning':"29700", 149 'description': 'Bachelor in Statistics with Computer'}, 150 "LLBPT": {'new':"47200", 151 'returning':"32700", 152 'description': 'Bachelor in Law'}, 153 "ODPT": {'new':"58700", 154 'returning':"42700", 155 'description': 'Doctor of Optometry'}, 156 "PHARMD": {'new':"58700", 157 'returning':"44700", 158 'description': 'Doctor of Pharmacy'}, 159 "BEEL": {'new':"38700", 160 'returning':"32700", 161 'description': 'Bachelor in Electrical/Electronics'}, 162 "BECE": {'new':"38700", 163 'returning':"32700", 164 'description': 'Bachelor in Chemical Engineering'}, 165 "BECO": {'new':"38700", 166 'returning':"32700", 167 'description': 'Bachelor in Computer Engineering'}, 168 "BPRE": {'new':"38700", 169 'returning':"32700", 170 'description': 'Bachelor in Production Engineering'}, 171 "BEPE": {'new':"38700", 172 'returning':"32700", 173 'description': 'Bachelor in Petroleum Engineering'}, 174 "BECV": {'new':"38700", 175 'returning':"32700", 176 'description': 'Bachelor in Civil Engineering'}, 177 } 29 178 #sessionstring = "School Fee for Session %s" % context.portal_vocabularies.sessions.get(session) 30 179 # sessionstring = "School Fee for Session %s" % context.sessions_voc(key=session) … … 35 184 # return fee_1_data 36 185 # return fee_2_data 37 f = 1 38 if faculty in fee1: 39 f = 0 40 return (session_fees[session][f], 41 "School Fee for Session %s" % context.sessions_voc(key=session)) 186 d = {} 187 if brain.mode.endswith('_ft'): 188 f = 1 189 if brain.faculty in fee1: 190 f = 0 191 d['new'] = session_fees[brain.session][f] 192 d['returning'] = session_fees[brain.session][f] 193 d['description'] = "School Fee for Session %s" % context.sessions_voc(key=brain.session) 194 if pt_fees.has_key(brain.course): 195 d = pt_fees[brain.course] 196 d['description'] = "School Fee for Session %s %s" % (context.sessions_voc(key=brain.session), 197 d['description']) 198 return d 42 199 -
WAeUP_SRP/trunk/skins/waeup_epayment/interswitch_form.pt
r1937 r2151 1 1 <metal:body use-macro="here/main_template/macros/master"> 2 <metal:main fill-slot="main" 3 tal:define="info options/info"> 4 5 <h3>Confirm Your Payment Data! </h3> 6 <br /> 7 2 <metal:main fill-slot="main" 3 tal:define="info options/info"> 4 <h3>Confirm Your Payment Data! </h3> 5 <br /> 6 <span tal:condition="not: info/payment_possible"> 7 No payment Information for your course available. 8 </span> 9 <span tal:condition="info/payment_possible"> 8 10 <form method="post" action="pay_interswitch"> 9 11 <table> … … 40 42 41 43 </form> 44 </span> 42 45 </metal:main> 43 46 </metal:body> -
WAeUP_SRP/trunk/skins/waeup_epayment/pay_interswitch.py
r1992 r2151 34 34 35 35 sbrain = context.students_catalog(id=student_id)[0] 36 amount,description = context.getSchoolFee(sbrain.faculty,sbrain.session)36 #amount,description = context.getSchoolFee(sbrain.faculty,sbrain.session,sbrain.course) 37 37 info = {} 38 info['student'] = sbrain 39 info['payment_possible'] = False 40 fee_dict = context.getSchoolFee(sbrain) 41 if not fee_dict: 42 return context.interswitch_form(info=info) 43 info['payment_possible'] = True 38 44 info['site_id'] = '61' 39 45 info['currency_id'] = '566' 40 info['amount'] = amount 41 info['type_code'] = sbrain.faculty 42 info['type_description'] = description 46 if sbrain.entry_session == context.getSessionId()[-2:]: 47 amount = info['amount'] = fee_dict['new'] 48 else: 49 amount = info['amount'] = fee_dict['returning'] 50 if sbrain.mode.endswith('_ft'): 51 pay_item_id = "6100" 52 info['type_code'] = sbrain.faculty 53 else: 54 pay_item_id = "6101" 55 info['type_code'] = sbrain.course 56 info['type_description'] = fee_dict['description'] 43 57 info['pay_bill_to'] = sbrain.name 44 58 info['pay_ship_to'] = "University of Benin" … … 52 66 p_id = "p%s" % order_id 53 67 54 #from Products.zdb import set_trace;set_trace()55 68 if student_id is None: 56 69 return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) … … 132 145 args['site_name'] = "uniben.waeup.org" 133 146 args['cust_name_desc'] = "Student Name" 134 args['pay_item_id'] = "6100"147 args['pay_item_id'] = pay_item_id 135 148 args['pay_item_name'] = "UNIBEN Tuition Payments" 136 149 args['payment_params'] = 'switch_college_split' -
WAeUP_SRP/trunk/skins/waeup_epayment/payments_view.pt
r1950 r2151 7 7 <span tal:condition="info" tal:omit-tag=""> 8 8 <span tal:define= " rows info/payments; 9 review_state context/getStudentReviewState;10 is_student context/isStudent;11 s_name context/getStudentNameInContext;"9 review_state info/review_state; 10 is_student info/is_student; 11 s_name info/student_name;" 12 12 > 13 13 <a href="" … … 57 57 <br /> 58 58 <div> 59 <form tal:condition=" python:review_state == 'cleared_and_validated'"59 <form tal:condition="info/online_payment" 60 60 tal:attributes="action string: ${context/absolute_url}/pay_interswitch" method="post" class="group"> 61 61 <input type="submit" name="epayment" … … 64 64 /> 65 65 </form> 66 <form tal:condition=" python:review_state == 'returning'"66 <form tal:condition="not: info/online_payment" 67 67 tal:attributes="action string: ${context/absolute_url}/pay_by_sc" method="post" class="group"> 68 68 <input type="hidden" name="paid_session"
Note: See TracChangeset for help on using the changeset viewer.