Changeset 17434 for main/waeup.aaue/trunk/src/waeup/aaue/interswitch
- Timestamp:
- 18 Jun 2023, 04:57:54 (20 months ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py
r17433 r17434 182 182 self.redirect(self.url(self.context, '@@index')) 183 183 return 184 student = self.student 184 185 category = self.context.p_category 186 # To guarantee that cleared students pay both acceptance fee 187 # and school fees, the page can only be accessed 188 # for school fee payments if acceptance/clearance fee has 189 # been successfully queried/paid beforehand. This 190 # requirement applies to students in state 'cleared' and 191 # entry_session greater than 2012 only. 192 if self.context.p_category.startswith('schoolfee') and \ 193 student.state == CLEARED and \ 194 student.entry_session > 2012: 195 acceptance_fee_paid = False 196 for ticket in student['payments'].values(): 197 if ticket.p_state == 'paid' and \ 198 ticket.p_category.startswith('clearance'): 199 acceptance_fee_paid = True 200 break 201 if not acceptance_fee_paid: 202 self.flash( 203 _('Please pay acceptance fee first.'), type="danger") 204 self.redirect(self.url(self.context, '@@index')) 205 return 185 206 # Already now it becomes an Interswitch payment. We set the net amount 186 207 # and add the gateway amount. … … 190 211 self.context.gateway_amt = GATEWAY_AMT 191 212 self.context.r_company = u'interswitch' 192 student = self.student193 213 xmldict = self.xmldict 194 214 # Provider data -
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py
r17431 r17434 261 261 self.payment_url = self.browser.url 262 262 self.browser.getLink("Pay via Interswitch", index=0).click() 263 #self.assertTrue(264 # 'Please pay acceptance fee first' in self.browser.contents)265 #acc_payment = createObject('waeup.StudentOnlinePayment')266 #acc_payment.p_state = 'paid'267 #acc_payment.p_category = 'clearance'268 #self.student['payments']['xyz'] = acc_payment269 #self.browser.getLink("Pay via Interswitch", index=0).click()270 263 self.assertTrue('Total Amount Authorized:' 271 264 in self.browser.contents) … … 286 279 self.assertTrue('<span>92000.0</span>' in self.browser.contents) 287 280 self.payment_url = self.browser.url 281 self.browser.getLink("Pay via Interswitch", index=0).click() 282 self.assertTrue( 283 'Please pay acceptance fee first' in self.browser.contents) 284 acc_payment = createObject('waeup.StudentOnlinePayment') 285 acc_payment.p_state = 'paid' 286 acc_payment.p_category = 'clearance' 287 self.student['payments']['xyz'] = acc_payment 288 288 self.browser.getLink("Pay via Interswitch", index=0).click() 289 289 self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.