Changeset 15224 for main/waeup.aaue/trunk
- Timestamp:
- 9 Nov 2018, 07:56:13 (6 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py
r15192 r15224 80 80 provider_bank_id = PROVIDER_BANK_ID 81 81 provider_acct = PROVIDER_ACCT 82 institution_acct = '1010835352' 83 institution_bank_id = '117' 82 84 83 85 def update(self): … … 102 104 self.provider_bank_id = '10' 103 105 self.provider_acct = '0427773399' 106 elif self.applicant.applicant_id.startswith('bridge',): # easier to test 107 provider_amt = 2000.0 108 self.institution_acct = '1014847058' 109 self.institution_bank_id = '7' 110 104 111 xmldict = {} 105 xmldict['institution_acct'] = '1010835352'106 xmldict['institution_bank_id'] = '117'107 112 xmldict['detail_ref'] = self.context.p_id 108 113 xmldict['provider_amt'] = 100 * provider_amt … … 110 115 xmldict['provider_bank_id'] = self.provider_bank_id 111 116 xmldict['provider_item_name'] = PROVIDER_ITEM_NAME 117 xmldict['institution_acct'] = self.institution_acct 118 xmldict['institution_bank_id'] = self.institution_bank_id 112 119 xmldict['institution_item_name'] = self.category 113 120 xmldict['institution_name'] = INSTITUTION_NAME 121 xmldict['institution_amt'] = 100 * ( 122 self.context.amount_auth - provider_amt - GATEWAY_AMT) 123 xmltext = """<payment_item_detail> 124 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s"> 125 <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" /> 126 <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" /> 127 </item_details> 128 </payment_item_detail>""" % xmldict 114 129 115 130 if self.applicant.applicant_id.startswith('pg'): … … 123 138 <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" /> 124 139 <item_detail item_id="3" item_name="PG Handbook" item_amt="%(handbook_amount)d" bank_id="117" acct_num="1010827641" /> 125 </item_details>126 </payment_item_detail>""" % xmldict127 128 elif self.applicant.applicant_id.startswith('utme'):129 xmldict['provider_amt'] = 100 * provider_amt130 xmldict['institution_amt'] = 100 * (131 self.context.amount_auth - provider_amt - GATEWAY_AMT)132 xmltext = """<payment_item_detail>133 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s">134 <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" />135 <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" />136 </item_details>137 </payment_item_detail>""" % xmldict138 139 else:140 xmldict['institution_amt'] = 100 * (141 self.context.amount_auth - provider_amt - GATEWAY_AMT)142 xmltext = """<payment_item_detail>143 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s">144 <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" />145 <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" />146 140 </item_details> 147 141 </payment_item_detail>""" % xmldict -
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py
r15191 r15224 157 157 self.assertTrue( 158 158 'This payment ticket is too old. Please create a new ticket' 159 in self.browser.contents) 160 161 def test_interswitch_form_bridge(self): 162 self.applicant.applicant_id = u'bridge_xyz' 163 self.browser.getControl("Add online").click() 164 self.assertTrue('ticket created' in self.browser.contents) 165 #self.browser.getLink(value).click() 166 self.assertTrue('Amount Authorized' in self.browser.contents) 167 self.assertTrue('<span>10000.0</span>' in self.browser.contents) 168 self.payment_url = self.browser.url 169 # Manager can access InterswitchForm 170 self.browser.getLink("CollegePAY", index=0).click() 171 self.assertTrue('Total Amount Authorized:' in self.browser.contents) 172 self.assertTrue( 173 '<input type="hidden" name="amount" value="1000000" />' 174 in self.browser.contents) 175 self.assertTrue( 176 'item_name="WAeAC" item_amt="200000"' 177 in self.browser.contents) 178 self.assertTrue( 179 'item_name="Application Fee" item_amt="775000" bank_id="7" acct_num="1014847058"' 159 180 in self.browser.contents) 160 181 -
main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py
r15217 r15224 145 145 'ioe_dp': 'Institute of Education Diploma', 146 146 'ijmbe': 'IJMBE Preparation', 147 'bridge': 'Bridge' 147 'bridge': 'Bridge', 148 148 } 149 149
Note: See TracChangeset for help on using the changeset viewer.