Changeset 16849 for main/kofacustom.unidel/trunk/src
- Timestamp:
- 28 Feb 2022, 22:35:16 (3 years ago)
- Location:
- main/kofacustom.unidel/trunk/src/kofacustom/unidel/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.unidel/trunk/src/kofacustom/unidel/interswitch/browser.py
r16790 r16849 93 93 xmldict['institution_bank_id'] = '117' 94 94 provider_amt = 0.0 95 tech_fee = 1200 95 96 if self.context.p_category == 'clearance': 96 97 provider_amt = 500.0 98 if self.context.p_category == 'schoolfee': 99 provider_amt = 2800.0 100 tech_fee = 1200 97 101 self.pay_item_id = 'Default_Payable_MX47126' # must be provided by Interswitch 98 102 xmldict['provider_amt'] = 100 * provider_amt 103 xmldict['tech_fee'] = 100 * tech_fee 99 104 xmldict['institution_item_name'] = self.context.category 100 105 xmldict['institution_name'] = INSTITUTION_NAME … … 103 108 self.context.provider_amt = provider_amt 104 109 self.context.amount_auth += provider_amt 110 self.context.amount_auth += tech_fee 105 111 if provider_amt == 0: 106 112 xmltext = """<payment_item_detail> … … 109 115 </item_details> 110 116 </payment_item_detail>""" % xmldict 117 elif tech_fee == 0: 118 xmltext = """<payment_item_detail> 119 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 120 <item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" /> 121 <item_detail item_id="2" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" /> 122 </item_details> 123 </payment_item_detail>""" % xmldict 111 124 else: 112 125 xmltext = """<payment_item_detail> … … 114 127 <item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" /> 115 128 <item_detail item_id="2" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" /> 129 <item_detail item_id="3" item_name="Technology Fee" item_amt="%(tech_fee)d" bank_id="117" acct_num="1216063205" /> 116 130 </item_details> 117 131 </payment_item_detail>""" % xmldict -
main/kofacustom.unidel/trunk/src/kofacustom/unidel/interswitch/tests.py
r16835 r16849 78 78 self.assertEqual(self.student.current_mode, 'ug_ft') 79 79 self.assertTrue( 80 '<input type="hidden" name="amount" value="8 025000" />' in80 '<input type="hidden" name="amount" value="8425000" />' in 81 81 self.browser.contents) 82 82 self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.