- Timestamp:
- 17 Mar 2012, 11:49:56 (13 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_uniben
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_uniben/getPaymentsFolderInfo.py
r7901 r7902 57 57 # begin customization 58 58 59 if session in ('11','12','13'): 59 info['payment_method'] = "" 60 61 if review_state in ('cleared_and_validated', 'returning') and session in ('11','12','13'): 60 62 info['payment_method'] = "online_payment" 63 elif review_state in ('cleared_and_validated', 'returning'): 64 info['payment_method'] = "sc_payment" 61 65 else: 62 info['payment_method'] = " sc_payment"66 info['payment_method'] = "" 63 67 64 68 info['prod_id'] = '61' -
WAeUP_SRP/trunk/skins/waeup_uniben/payment_receipt.pt
r7901 r7902 51 51 52 52 <metal:block tal:condition="info/is_etranzact_pmt"> 53 <h3>eTranzact Payment Slip </h3>53 <h3>eTranzact Payment Slip/Receipt</h3> 54 54 <br /> 55 55 <table tal:define="student info/student; … … 119 119 </tr> 120 120 <tr> 121 <td width="220px">Transaction Id:</td>121 <td width="220px">Transaction Code:</td> 122 122 <td><strong><span tal:content="pm/order_id" /></strong></td> 123 123 </tr> … … 129 129 <td width="220px">Response Description:</td> 130 130 <td><span tal:content="pm/resp_desc" /></td> 131 </tr> 132 <tr> 133 <td width="220px">Response Reference:</td> 134 <td><span tal:content="pm/resp_pay_reference" /></td> 131 135 </tr> 132 136 </table> -
WAeUP_SRP/trunk/skins/waeup_uniben/tranzact_cb.py
r7901 r7902 99 99 return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url()) 100 100 101 pd['resp_desc'] = success_dict['TRANS_DESCR'] 101 pd = {} 102 pd['resp_desc'] = success_dict['TRANS_DESCR'].replace('%20',' ') 102 103 pd['resp_pay_reference'] = success_dict['RECEIPT_NO'] 103 pd['resp_code'] = ' 00'104 pd['resp_code'] = 'ET' 104 105 pd['resp_approved_amount'] = success_dict['TRANS_AMOUNT'] 106 pd['status'] = 'paid' 105 107 106 108 pay_doc.edit(mapping = pd) … … 116 118 next_verdict = next_info['next_verdict'] 117 119 next_previous_verdict = next_info['next_previous_verdict'] 118 if resp == '00': 119 if pay_doc.category == 'schoolfee': 120 if context.getStudentReviewState() == "school_fee_paid": 121 logger.info('%s paid school_fee in state school_fee_paid' % (student_id)) 122 else: 123 study_course = getattr(student,'study_course') 124 try: 125 wftool.doActionFor(study_course,'open') 126 except: 127 pass 128 verdict = s_brain.verdict 129 if next_previous_verdict == 'N/A': 130 next_previous_verdict = '' 131 study_course.getContent().edit(mapping= {'current_level': next_level_id, 132 'current_session': next_session_id, 133 'current_verdict': next_verdict, 134 'previous_verdict': next_previous_verdict, 135 }) 136 if next_transition: 137 wftool.doActionFor(student,next_transition) 120 if pay_doc.category == 'schoolfee': 121 if context.getStudentReviewState() == "school_fee_paid": 122 logger.info('%s paid school_fee in state school_fee_paid' % (student_id)) 123 else: 124 study_course = getattr(student,'study_course') 125 try: 126 wftool.doActionFor(study_course,'open') 127 except: 128 pass 129 verdict = s_brain.verdict 130 if next_previous_verdict == 'N/A': 131 next_previous_verdict = '' 132 study_course.getContent().edit(mapping= {'current_level': next_level_id, 133 'current_session': next_session_id, 134 'current_verdict': next_verdict, 135 'previous_verdict': next_previous_verdict, 136 }) 137 if next_transition: 138 wftool.doActionFor(student,next_transition) 138 139 139 140 140 141 elif pay_doc.category == 'hostel_maintenance': 141 142 142 143 144 145 146 147 148 149 143 ## callback function for accommodation_catalog method 144 data={} 145 data['acco_maint_date'] = pay_doc.date 146 data['catkey'] =student_id + '|' + pay_doc.session_id 147 data['acco_maint_fee'] = pay_doc.amount 148 data['acco_maint_pay_id'] = context.getId() 149 data['reservation_status'] = 'maintenance_fee_paid' 150 context.accommodation_catalog.modifyRecord(**data) 150 151 151 152 153 154 155 156 157 158 159 160 161 162 163 164 152 ## callback function for accommodation object method (deactivated since March 2011) 153 #acco_info = context.getAccommodationInfo() 154 #d = {} 155 #d['acco_maint_date'] = pay_doc.date 156 #d['acco_maint_fee'] = pay_doc.amount 157 #d['acco_maint_pay_id'] = context.getId() 158 #try: 159 # acco_info['acco_doc'].edit(mapping=d) 160 #except: 161 # logger.info('%s requeried payment though maintenance already paid' % student_id) 162 #try: 163 # wftool.doActionFor(acco_info['acco'],'pay_maintenance_fee',dest_container=acco_info['acco']) 164 #except: 165 # logger.info('%s no workflow action pay_maintenance_fee' % student_id) 165 166 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 167 elif pay_doc.category == 'acceptance': 168 if context.getStudentReviewState() in ('admitted', 'objection_raised'): 169 logger.info('%s paid acceptance fee' % (student_id)) 170 current = DateTime.DateTime() 171 wf = context.portal_workflow 172 info = context.getClearanceInfo() 173 wftool.doActionFor(student,'enter_clearance_pin') 174 context.waeup_tool.changeWorkflowState(info['clear'], 'opened') 175 context.waeup_tool.changeWorkflowState(info['app'], 'closed') 176 dc = {} 177 app_doc = info['app_doc'] 178 #dc['clr_ac_pin'] = pay_doc.order_id 179 dc['clr_ac_date'] = current 180 dc['entry_date'] = current 181 info['clear_doc'].edit(mapping = dc) 182 if info['penalty']: 183 logger.info('%s started late clearance' % (info['id'])) 184 #return redirect("%s/clearance_edit_form" % info['clear'].absolute_url()) 184 185 185 logger.info('%s received valid callback' % student_id) 186 187 else: 188 logger.info('%s received unsuccessful callback: %s' % (student_id,pd['resp_desc'])) 186 logger.info('%s received valid callback' % student_id) 189 187 190 188 #review_state = wftool.getInfoFor(context,'review_state',None)
Note: See TracChangeset for help on using the changeset viewer.