- Timestamp:
- 17 Apr 2023, 07:12:42 (22 months ago)
- Location:
- main/kofacustom.edocons/trunk/src/kofacustom/edocons/interswitch
- Files:
-
- 2 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
Note: See TracChangeset for help on using the changeset viewer.