- Timestamp:
- 31 Oct 2019, 15:14:54 (5 years ago)
- Location:
- main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interswitch/browser.py
r15726 r15728 30 30 from kofacustom.iuokada.interfaces import MessageFactory as _ 31 31 32 PRODUCT_ID = ' 6207' # must be provided by Interswitch32 PRODUCT_ID = '7922' 33 33 SITE_NAME = 'iuokada-kofa.waeup.org' 34 34 PROVIDER_ACCT = '0773411069' … … 37 37 INSTITUTION_NAME = 'IUOkada' 38 38 CURRENCY = '566' 39 GATEWAY_AMT = 300.0 40 MAC = 'CEF793CBBE838AA0CBB29B74D571113B4EA6586D3BA77E7CFA0B95E278364EFC4526ED7BD255A366CDDE11F1F607F0F844B09D93B16F7CFE87563B2272007AB3' # must be provided by Interswitch 41 42 #POST_ACTION = 'https://webpay.interswitchng.com/paydirect/pay' 43 POST_ACTION = 'https://sandbox.interswitchng.com/webpay/pay' 44 #HOST = 'webpay.interswitchng.com' 45 HOST = 'sandbox.interswitchng.com' 46 #URL = '/paydirect/api/v1/gettransaction.json' 47 URL = '/webpay/api/v1/gettransaction.json' 39 GATEWAY_AMT = 250.0 40 #MAC = 'CEF793CBBE838AA0CBB29B74D571113B4EA6586D3BA77E7CFA0B95E278364EFC4526ED7BD255A366CDDE11F1F607F0F844B09D93B16F7CFE87563B2272007AB3' # must be provided by Interswitch 41 MAC = '4D8723F33D728BE3F4A77B2DFB3F57B0BCF2DD818759D54A87B2A60874067F28D94F2B91E29BFB884F920F48E0973D826835A8F2D6F74220C64EDE4DE00E45AA' 42 43 POST_ACTION = 'https://webpay.interswitchng.com/paydirect/pay' 44 #POST_ACTION = 'https://sandbox.interswitchng.com/webpay/pay' 45 HOST = 'webpay.interswitchng.com' 46 #HOST = 'sandbox.interswitchng.com' 47 URL = '/paydirect/api/v1/gettransaction.json' 48 #URL = '/webpay/api/v1/gettransaction.json' 48 49 49 50 httplib.HTTPSConnection.debuglevel = 0 … … 74 75 xmldict['provider_bank_id'] = PROVIDER_BANK_ID 75 76 xmldict['provider_item_name'] = PROVIDER_ITEM_NAME 77 provider_amt = 0.0 78 xmldict['institution_acct'] = '' 79 xmldict['institution_bank_id'] = '' 80 provider_amt = 5000.0 81 self.pay_item_id = '' 76 82 # Institution data 77 xmldict['institution_acct'] = '0040484781' 78 xmldict['institution_bank_id'] = '31' 79 provider_amt = 5000.0 80 self.pay_item_id = '101' # '103' # must be provided by Interswitch 83 if self.context.p_category in ( 84 'schoolfee', 'schoolfee40', 'secondinstal'): 85 xmldict['institution_acct'] = '1011005811' 86 xmldict['institution_bank_id'] = '117' 87 self.pay_item_id = '101' 88 elif self.context.p_category == 'book': 89 xmldict['institution_acct'] = '1013249587' 90 xmldict['institution_bank_id'] = '117' 91 self.pay_item_id = '103' 92 elif self.context.p_category == 'parentsconsult': 93 xmldict['institution_acct'] = '1012355544' 94 xmldict['institution_bank_id'] = '117' 95 self.pay_item_id = '104' 96 else: 97 xmldict['institution_acct'] = '1011050158' 98 xmldict['institution_bank_id'] = '117' 99 self.pay_item_id = '102' 100 if self.context.p_category == 'registration': 101 provider_amt = 5000.0 81 102 xmldict['provider_amt'] = 100 * provider_amt 82 103 xmldict['institution_item_name'] = self.context.category -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interswitch/tests.py
r15721 r15728 72 72 self.payment_url = self.browser.url 73 73 self.browser.getLink("Pay via Interswitch", index=0).click() 74 self.assertTrue('<input type="hidden" name="pay_item_id" value="10 3" />' in74 self.assertTrue('<input type="hidden" name="pay_item_id" value="101" />' in 75 75 self.browser.contents) 76 76 self.assertEqual(self.student.current_mode, 'ug_ft') … … 79 79 self.browser.contents) 80 80 self.assertTrue( 81 'item_name="Tuition Plus (total amount)" item_amt="347 0000" bank_id="31" acct_num="0040484781"' in81 'item_name="Tuition Plus (total amount)" item_amt="3475000" bank_id="117" acct_num="1011005811"' in 82 82 self.browser.contents) 83 83 … … 93 93 self.browser.open(self.payments_path + '/xyz') 94 94 self.browser.getLink("Pay via Interswitch", index=0).click() 95 self.assertMatches('...<input type="hidden" name="pay_item_id" value="10 3" />...',95 self.assertMatches('...<input type="hidden" name="pay_item_id" value="102" />...', 96 96 self.browser.contents) 97 97 self.assertMatches('...Total Amount Authorized:...', -
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/utils/utils.py
r15686 r15728 31 31 'secondinstal': 'Tuition Plus (60% - 2nd instalment))', 32 32 'clearance': 'Acceptance Fee', 33 'registration': 'Registration Fee', 33 34 #'bed_allocation': 'Bed Allocation Fee', 34 35 #'hostel_maintenance': 'Accommodation', … … 58 59 'schoolfee40': 'Tuition, Accommodation, Adm. Charges (40% - 1st instalment)', 59 60 'secondinstal': 'Tuition, Accommodation, Adm. Charges (60% - 2nd instalment)', 61 'registration': 'Registration Fee', 60 62 #'bed_allocation': 'Bed Allocation Fee', 61 63 #'hostel_maintenance': 'Accommodation', … … 83 85 PREVIOUS_PAYMENT_CATEGORIES = { 84 86 'schoolfee': 'Tuition, Accommodation, Adm. Charges (total amount)', 87 'registration': 'Registration Fee', 85 88 'application': 'Application Fee', 86 89 'late_registration': 'Late Registration Fee',
Note: See TracChangeset for help on using the changeset viewer.