Changeset 14875 for main/kofacustom.dspg/trunk/src
- Timestamp:
- 24 Oct 2017, 08:43:15 (7 years ago)
- Location:
- main/kofacustom.dspg/trunk/src/kofacustom/dspg
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/browser.py
r14869 r14875 99 99 100 100 101 # Not yet readily configured. MAC is missing.Bank account numbers are101 # Not yet readily configured. Bank account numbers are 102 102 # contradictory. pay_item_ids are not yet assigned. 103 103 … … 111 111 currency = CURRENCY 112 112 product_id = PRODUCT_ID 113 mac = '' # must be provided by Interswitch 113 mac = 'D43ED93B7A307B152C7111D04E1F384428057CD1E75428D3A4C5631C28ACB9C8C822A88CA76DEDC5F9A520CF4BFDB2824FF8B207AAFC667DF3CBB13685B66627' 114 pay_item_id = '000' 114 115 115 116 def update(self): … … 127 128 xmldict['provider_item_name'] = PROVIDER_ITEM_NAME 128 129 # Institution data 129 xmldict['institution_acct'] = '00 10761873'130 xmldict['institution_bank_id'] = ' 11'130 xmldict['institution_acct'] = '00000000' 131 xmldict['institution_bank_id'] = '00' 131 132 xmldict['institution_amt'] = '0.0' 132 provider_amt = 500.0 133 133 provider_amt = 0.0 134 134 if self.context.p_category.startswith('schoolfee'): 135 135 self.pay_item_id = '102' 136 provider_amt = 2800.0 137 if self.student.current_mode.endswith('pt') or \ 138 self.student.current_mode.endswith('we'): 139 xmldict['institution_acct'] = '1012808851 ' 140 xmldict['institution_bank_id'] = '117' 141 elif self.student.current_mode in ('nd_ft', 'hnd_ft'): 142 xmldict['institution_acct'] = '0026235493' 143 xmldict['institution_bank_id'] = '31' 136 144 elif self.context.p_category == 'clearance': 137 145 self.pay_item_id = '103' 138 elif self.context.p_category == 'bed_allocation': 139 self.pay_item_id = '104' 140 elif self.context.p_category == 'hostel_maintenance': 141 self.pay_item_id = '105' 142 elif self.context.p_category == 'transfer': 143 self.pay_item_id = '106' 144 elif self.context.p_category == 'gown': 145 self.pay_item_id = '107' 146 elif self.context.p_category == 'transcript': 147 self.pay_item_id = '108' 148 elif self.context.p_category == 'late_registration': 149 self.pay_item_id = '109' 146 provider_amt = 500.0 147 if self.student.current_mode.endswith('pt') or \ 148 self.student.current_mode.endswith('we'): 149 xmldict['institution_acct'] = '1012808851 ' 150 xmldict['institution_bank_id'] = '117' 151 elif self.student.current_mode == 'nd_ft': 152 xmldict['institution_acct'] = '2004402644' 153 xmldict['institution_bank_id'] = '8' 150 154 elif self.context.p_category in SPECIAL_PAYMENT_PARAMS.keys(): 151 155 self.pay_item_id = SPECIAL_PAYMENT_PARAMS[self.context.p_category][0] … … 262 266 gateway_host = HOST 263 267 gateway_url = URL 268 mac = 'D43ED93B7A307B152C7111D04E1F384428057CD1E75428D3A4C5631C28ACB9C8C822A88CA76DEDC5F9A520CF4BFDB2824FF8B207AAFC667DF3CBB13685B66627' 264 269 265 270 class CustomInterswitchPaymentVerifyWebservicePageStudent( … … 271 276 gateway_host = HOST 272 277 gateway_url = URL 278 mac = 'D43ED93B7A307B152C7111D04E1F384428057CD1E75428D3A4C5631C28ACB9C8C822A88CA76DEDC5F9A520CF4BFDB2824FF8B207AAFC667DF3CBB13685B66627' 273 279 274 280 class CustomInterswitchPaymentRequestWebservicePageApplicant( -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/tests.py
r14862 r14875 59 59 IWorkflowState(self.student).setState('cleared') 60 60 self.student.nationality = u'NG' 61 # ND FT Non-Deltan Fresh Student School Fee 62 self.certificate.study_mode = 'nd_ft' 63 self.certificate.school_fee_3 = 30000.0 61 64 self.browser.open(self.payments_path + '/addop') 62 65 self.browser.getControl(name="form.p_category").value = ['schoolfee'] … … 70 73 self.browser.contents) 71 74 self.assertMatches( 72 '...<span>40000.0</span>...', 73 self.browser.contents) 74 self.payment_url = self.browser.url 75 self.browser.getLink("CollegePAY", index=0).click() 76 self.assertMatches('...<input type="hidden" name="pay_item_id" value="102" />...', 77 self.browser.contents) 78 self.assertMatches('...Total Amount Authorized:...', 79 self.browser.contents) 80 self.assertEqual(self.student.current_mode, 'ug_ft') 81 self.assertMatches( 82 '...<input type="hidden" name="amount" value="4000000" />...', 83 self.browser.contents) 84 self.assertMatches( 85 '...item_name="School Fee" item_amt="4000000" bank_id="11" acct_num="0010761873"...', 75 '...<span>30000.0</span>...', 76 self.browser.contents) 77 self.payment_url = self.browser.url 78 self.browser.getLink("CollegePAY", index=0).click() 79 self.assertTrue('<input type="hidden" name="pay_item_id" value="102" />' 80 in self.browser.contents) 81 self.assertTrue( 82 '<input type="hidden" name="amount" value="3000000" />' in 83 self.browser.contents) 84 self.assertTrue( 85 'item_name="School Fee" item_amt="2695000" bank_id="31" acct_num="0026235493"' in 86 self.browser.contents) 87 # ND FT Non-Deltan Fresh Student Acceptance Fee 88 self.app['configuration']['2004'].clearance_fee = 12345.0 89 self.browser.open(self.payments_path + '/addop') 90 self.browser.getControl(name="form.p_category").value = ['clearance'] 91 self.browser.getControl("Create ticket").click() 92 self.assertMatches('...ticket created...', 93 self.browser.contents) 94 ctrl = self.browser.getControl(name='val_id') 95 self.value = ctrl.options[1] 96 self.browser.getLink(self.value).click() 97 self.assertMatches('...Amount Authorized...', 98 self.browser.contents) 99 self.assertMatches( 100 '...<span>12345.0</span>...', 101 self.browser.contents) 102 self.payment_url = self.browser.url 103 self.browser.getLink("CollegePAY", index=0).click() 104 self.assertTrue('<input type="hidden" name="pay_item_id" value="103" />' in 105 self.browser.contents) 106 self.assertTrue( 107 '<input type="hidden" name="amount" value="1234500" />' in 108 self.browser.contents) 109 self.assertTrue( 110 'item_name="Acceptance" item_amt="1159500" bank_id="8" acct_num="2004402644"' in 86 111 self.browser.contents) 87 112 -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/locales/en/LC_MESSAGES/waeup.kofa.po
r14865 r14875 17 17 msgid "Special Application" 18 18 msgstr "Remedial Payment" 19 20 msgid "Initial School Fee" 21 msgstr "Initial School Fee (Deltan)" 22 23 msgid "Returning School Fee" 24 msgstr "Returning School Fee (Deltan)" 25 26 msgid "Foreigner Initial School Fee" 27 msgstr "Initial School Fee (Non-Deltan)" 28 29 msgid "Foreigner Returning School Fee" 30 msgstr "Returning School Fee (Non-Deltan)" -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/utils.py
r14861 r14875 23 23 from kofacustom.dspg.interfaces import MessageFactory as _ 24 24 25 26 def local(student): 27 lga = getattr(student, 'lga') 28 if lga and lga.startswith('delta'): 29 return True 30 return False 31 25 32 class CustomStudentsUtils(NigeriaStudentsUtils): 26 33 """A collection of customized methods. 27 28 34 """ 29 35 … … 71 77 # update method of the PreviousPaymentAddFormPage. 72 78 if previous_level == 100: 73 amount = getattr(certificate, 'school_fee_1', 0.0) 79 if local(student): 80 amount = getattr(certificate, 'school_fee_1', 0.0) 81 else: 82 amount = getattr(certificate, 'school_fee_3', 0.0) 74 83 else: 75 amount = getattr(certificate, 'school_fee_2', 0.0) 84 if local(student): 85 amount = getattr(certificate, 'school_fee_2', 0.0) 86 else: 87 amount = getattr(certificate, 'school_fee_4', 0.0) 76 88 else: 77 89 if student.state == CLEARED: 78 amount = getattr(certificate, 'school_fee_1', 0.0) 90 if local(student): 91 amount = getattr(certificate, 'school_fee_1', 0.0) 92 else: 93 amount = getattr(certificate, 'school_fee_3', 0.0) 79 94 elif student.state == RETURNING: 80 95 # In case of returning school fee payment the … … 88 103 u'Session configuration object is not available.' 89 104 ), None 90 amount = getattr(certificate, 'school_fee_2', 0.0) 105 if local(student): 106 amount = getattr(certificate, 'school_fee_2', 0.0) 107 else: 108 amount = getattr(certificate, 'school_fee_4', 0.0) 91 109 elif student.is_postgrad and student.state == PAID: 92 110 # Returning postgraduate students also pay for the … … 99 117 u'Session configuration object is not available.' 100 118 ), None 101 amount = getattr(certificate, 'school_fee_2', 0.0) 119 if local(student): 120 amount = getattr(certificate, 'school_fee_2', 0.0) 121 else: 122 amount = getattr(certificate, 'school_fee_4', 0.0) 102 123 elif category == 'clearance': 103 124 try: … … 106 127 return _('Study course data are incomplete.'), None 107 128 amount = academic_session.clearance_fee 129 if student.current_mode == 'nd_ft' and local(student): 130 amount /= 2 131 if student.current_mode == 'hnd_ft': 132 amount = 0.0 108 133 elif category == 'bed_allocation': 109 134 p_item = self.getAccommodationDetails(student)['bt']
Note: See TracChangeset for help on using the changeset viewer.