- Timestamp:
- 9 Mar 2017, 10:42:42 (8 years ago)
- Location:
- main/waeup.kwarapoly/trunk/src/waeup/kwarapoly
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/browser.py
r14329 r14616 126 126 xmldict['institution_acct'] = '0838798044' 127 127 xmldict['institution_bank_id'] = '76' 128 if self.context.p_category == 'schoolfee' \ 128 if self.context.p_item == 'Balance': 129 self.pay_item_id = '000' 130 dalash_amt = 0.0 131 provider_amt = 0.0 132 xmldict['institution_acct'] = '0838798044' 133 xmldict['institution_bank_id'] = '76' 134 elif self.context.p_category == 'schoolfee' \ 129 135 or self.context.p_category.startswith('carryover'): 130 136 self.pay_item_id = '101' … … 201 207 # Interswitch amount is not part of the xml data 202 208 203 if 'maintenance' in self.context.p_category: 209 if 'maintenance' in self.context.p_category \ 210 or self.context.p_item == 'Balance': 204 211 xmltext = """<payment_item_detail> 205 212 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/utils.py
r14587 r14616 28 28 from waeup.kofa.fees import FeeTable 29 29 from waeup.kofa.hostels.hostel import NOT_OCCUPIED 30 from waeup.kwarapoly.interswitch.browser import GATEWAY_AMT 30 31 from waeup.kwarapoly.interfaces import MessageFactory as _ 31 32 … … 277 278 return None, payment 278 279 280 def setBalanceDetails(self, category, student, 281 balance_session, balance_level, balance_amount): 282 """Create a balance payment ticket and set the payment data 283 as selected by the student. Kwarapoly: Add Interswitch surcharge 284 """ 285 p_item = u'Balance' 286 p_session = balance_session 287 p_level = balance_level 288 p_current = False 289 amount = balance_amount 290 academic_session = self._getSessionConfiguration(p_session) 291 if academic_session == None: 292 return _(u'Session configuration object is not available.'), None 293 if amount in (0.0, None) or amount < 0: 294 return _('Amount must be greater than 0.'), None 295 payment = createObject(u'waeup.StudentOnlinePayment') 296 timestamp = ("%d" % int(time()*10000))[1:] 297 payment.p_id = "p%s" % timestamp 298 payment.p_category = category 299 payment.p_item = p_item 300 payment.p_session = p_session 301 payment.p_level = p_level 302 payment.p_current = p_current 303 payment.amount_auth = amount + GATEWAY_AMT 304 return None, payment 305 279 306 def getAccommodationDetails(self, student): 280 307 """Determine the accommodation data of a student. -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/viewlets.py
r12907 r14616 35 35 return '' 36 36 37 class AddBalancePaymentActionButton(AddBalancePaymentActionButton):37 #class AddBalancePaymentActionButton(AddBalancePaymentActionButton): 38 38 39 @property40 def target_url(self):41 return ''39 # @property 40 # def target_url(self): 41 # return '' 42 42 43 43 class AdmissionNotificationActionButton(ManageActionButton):
Note: See TracChangeset for help on using the changeset viewer.