Changeset 17380
- Timestamp:
- 17 Apr 2023, 07:12:42 (21 months ago)
- Location:
- main/kofacustom.edocons/trunk/src/kofacustom/edocons
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.edocons/trunk/src/kofacustom/edocons/interswitch/browser.py
r17345 r17380 19 19 import hashlib 20 20 import grok 21 import decimal 21 22 from kofacustom.nigeria.interswitch.browser import ( 22 23 module_activated, … … 97 98 xmldict['institution_item_name'] = self.context.category 98 99 xmldict['institution_name'] = INSTITUTION_NAME 99 xmldict['institution_amt'] = 100 * self.context.net_amt100 xmldict['institution_amt'] = 100*int(decimal.Decimal(str(self.context.net_amt))) 100 101 if not self.context.provider_amt: 101 102 self.context.provider_amt = provider_amt … … 116 117 self.xml_data = """<input type="hidden" name="xml_data" value='%s' />""" % xmltext 117 118 self.context.provider_amt = provider_amt 118 self.amount_auth = int(100 * self.context.amount_auth)119 self.amount_auth = 100*int(decimal.Decimal(str(self.context.amount_auth))) 119 120 hashargs = ( 120 121 self.context.p_id + 121 122 PRODUCT_ID + 122 123 self.pay_item_id + 123 str( int(self.amount_auth)) +124 str(self.amount_auth) + 124 125 self.site_redirect_url + 125 126 self.mac) -
main/kofacustom.edocons/trunk/src/kofacustom/edocons/interswitch/tests.py
r17031 r17380 94 94 self.browser.contents) 95 95 self.assertTrue( 96 '<span>2 6400.0</span>' in self.browser.contents)96 '<span>27800.0</span>' in self.browser.contents) 97 97 self.payment_url = self.browser.url 98 98 self.browser.getLink("Pay via Interswitch CollegePAY", index=0).click() … … 101 101 self.assertEqual(self.student.current_mode, 'ug_ft') 102 102 self.assertTrue( 103 '<input type="hidden" name="amount" value="2 670000" />' in104 self.browser.contents) 105 self.assertTrue( 106 'item_name="School Fee (6 6% - 1st instalment)" item_amt="2640000" bank_id="31" acct_num="1489560452"' in103 '<input type="hidden" name="amount" value="2810000" />' in 104 self.browser.contents) 105 self.assertTrue( 106 'item_name="School Fee (69.5% - 1st instalment)" item_amt="2780000" bank_id="31" acct_num="1489560452"' in 107 107 self.browser.contents) 108 108 -
main/kofacustom.edocons/trunk/src/kofacustom/edocons/students/utils.py
r17208 r17380 85 85 if category == 'secondinstal': 86 86 if student.is_fresh: 87 amount = 0.3 4* getattr(certificate, 'school_fee_1', 0.0)87 amount = 0.305 * getattr(certificate, 'school_fee_1', 0.0) 88 88 else: 89 amount = 0.3 4* getattr(certificate, 'school_fee_2', 0.0)89 amount = 0.305 * getattr(certificate, 'school_fee_2', 0.0) 90 90 if student.state == CLEARED: 91 91 amount = getattr(certificate, 'school_fee_1', 0.0) … … 114 114 ), None 115 115 if category == 'schoolfee_1': 116 amount *= 0.6 6116 amount *= 0.695 117 117 elif category == 'clearance': 118 118 try: -
main/kofacustom.edocons/trunk/src/kofacustom/edocons/utils/utils.py
r17365 r17380 57 57 PAYMENT_CATEGORIES = { 58 58 'schoolfee': 'School Fee (total amount)', 59 'schoolfee_1': 'School Fee (6 6% - 1st instalment)',60 'secondinstal': 'School Fee (3 4% - 2nd instalment)',59 'schoolfee_1': 'School Fee (69.5% - 1st instalment)', 60 'secondinstal': 'School Fee (30.5% - 2nd instalment)', 61 61 'clearance': 'Acceptance Fee', 62 62 'hostel':'Hostel Fee (1st instalment)', … … 76 76 SELECTABLE_PAYMENT_CATEGORIES = { 77 77 'schoolfee': 'School Fee (total amount)', 78 'schoolfee_1': 'School Fee (6 6% - 1st instalment)',79 'secondinstal': 'School Fee (3 4% - 2nd instalment)',78 'schoolfee_1': 'School Fee (69.5% - 1st instalment)', 79 'secondinstal': 'School Fee (30.5% - 2nd instalment)', 80 80 'hostel':'Hostel Fee (1st instalment)', 81 81 'hostel_2':'Hostel Fee (2nd instalment)',
Note: See TracChangeset for help on using the changeset viewer.