Changeset 14862
- Timestamp:
- 6 Oct 2017, 09:19:26 (7 years ago)
- Location:
- main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/browser.py
r14859 r14862 86 86 } 87 87 88 89 # Not yet readily configured. MAC is missing. Bank account numbers are 90 # contradictory. pay_item_ids are not yet assigned. 91 88 92 class CustomInterswitchPageStudent(InterswitchPageStudent): 89 93 """ View which sends a POST request to the Interswitch … … 111 115 xmldict['provider_item_name'] = PROVIDER_ITEM_NAME 112 116 # Institution data 113 xmldict['institution_acct'] = '00 000000'114 xmldict['institution_bank_id'] = ' 00'117 xmldict['institution_acct'] = '0010761873' 118 xmldict['institution_bank_id'] = '11' 115 119 xmldict['institution_amt'] = '0.0' 116 120 provider_amt = 500.0 117 self.pay_item_id = '0000' # must be provided by Interswitch 121 122 if self.context.p_category.startswith('schoolfee'): 123 self.pay_item_id = '102' 124 elif self.context.p_category == 'clearance': 125 self.pay_item_id = '103' 126 elif self.context.p_category == 'bed_allocation': 127 self.pay_item_id = '104' 128 elif self.context.p_category == 'hostel_maintenance': 129 self.pay_item_id = '105' 130 elif self.context.p_category == 'transfer': 131 self.pay_item_id = '106' 132 elif self.context.p_category == 'gown': 133 self.pay_item_id = '107' 134 elif self.context.p_category == 'transcript': 135 self.pay_item_id = '108' 136 elif self.context.p_category == 'late_registration': 137 self.pay_item_id = '109' 138 elif self.context.p_category in SPECIAL_PAYMENT_PARAMS.keys(): 139 self.pay_item_id = SPECIAL_PAYMENT_PARAMS[self.context.p_category][0] 140 provider_amt = SPECIAL_PAYMENT_PARAMS[self.context.p_category][1] 141 xmldict['institution_acct'] = SPECIAL_PAYMENT_PARAMS[self.context.p_category][2] 142 xmldict['institution_bank_id'] = SPECIAL_PAYMENT_PARAMS[self.context.p_category][3] 118 143 xmldict['provider_amt'] = 100 * provider_amt 119 144 xmldict['institution_item_name'] = self.context.category -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/tests.py
r14732 r14862 74 74 self.payment_url = self.browser.url 75 75 self.browser.getLink("CollegePAY", index=0).click() 76 self.assertMatches('...<input type="hidden" name="pay_item_id" value=" 0000" />...',76 self.assertMatches('...<input type="hidden" name="pay_item_id" value="102" />...', 77 77 self.browser.contents) 78 78 self.assertMatches('...Total Amount Authorized:...', … … 83 83 self.browser.contents) 84 84 self.assertMatches( 85 '...item_name="School Fee" item_amt="4000000" bank_id=" 00" acct_num="00000000"...',85 '...item_name="School Fee" item_amt="4000000" bank_id="11" acct_num="0010761873"...', 86 86 self.browser.contents) 87 87 … … 97 97 self.browser.open(self.payments_path + '/xyz') 98 98 self.browser.getLink("CollegePAY", index=0).click() 99 self.assertMatches('...<input type="hidden" name="pay_item_id" value=" 0000" />...',99 self.assertMatches('...<input type="hidden" name="pay_item_id" value="103" />...', 100 100 self.browser.contents) 101 101 self.assertMatches('...Total Amount Authorized:...',
Note: See TracChangeset for help on using the changeset viewer.