Changeset 17927 for main/kofacustom.edopoly
- Timestamp:
- 13 Sep 2024, 10:45:39 (2 months ago)
- Location:
- main/kofacustom.edopoly/trunk/src/kofacustom/edopoly
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interfaces.py
r17635 r17927 65 65 default = 0.0, 66 66 required = False, 67 ) 68 69 interswitch_enabled = schema.Bool( 70 title = _(u'Interswitch Collegepay integration enabled'), 71 default = True, 72 ) 73 74 interswitch_webcheckout_enabled = schema.Bool( 75 title = _(u'Interswitch WebCheckout integration enabled'), 76 default = False, 67 77 ) 68 78 -
main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interswitch/browser.py
r16820 r17927 25 25 InterswitchPaymentVerifyWebservicePageStudent, 26 26 InterswitchPageStudent, InterswitchPageApplicant, 27 module_activated, 28 ) 29 from kofacustom.nigeria.interswitch.webcheckoutbrowser import ( 30 webcheckout_module_activated, 31 WebCheckoutPageStudent, 32 WebCheckoutPageApplicant, 33 WebCheckoutConfirmTransactionStudent, 34 WebCheckoutConfirmTransactionApplicant, 27 35 ) 28 36 from kofacustom.edopoly.students.interfaces import ICustomStudentOnlinePayment … … 69 77 70 78 def update(self): 79 if not module_activated( 80 self.context.student.current_session, self.context): 81 self.flash(_('Forbidden'), type='danger') 82 self.redirect(self.url(self.context, '@@index')) 83 return 71 84 error = self.init_update() 72 85 if error: … … 152 165 153 166 def update(self): 167 if not module_activated( 168 self.context.__parent__.__parent__.year, self.context): 169 self.flash(_('Forbidden'), type='danger') 170 self.redirect(self.url(self.context, '@@index')) 171 return 154 172 error = self.init_update() 155 173 if error: … … 251 269 gateway_url = URL 252 270 mac = MAC 271 272 # WebCheckout customizations 273 274 MERCHANT_CODE = 'MX176634' 275 PAY_ITEM_ID = '102' 276 277 class CustomWebCheckoutPageStudent(WebCheckoutPageStudent): 278 """ View which sends a POST request to the Interswitch 279 WebCheckout payment gateway. 280 """ 281 #action = 'https://newwebpay.interswitchng.com/collections/w/pay' 282 action = 'https://newwebpay.qa.interswitchng.com/collections/w/pay' 283 currency = '566' 284 pay_item_id = PAY_ITEM_ID 285 merchant_code = MERCHANT_CODE 286 gateway_amt = 0.0 287 product_id = PRODUCT_ID 288 289 class CustomWebCheckoutPageApplicant(WebCheckoutPageApplicant): 290 """ View which sends a POST request to the Interswitch 291 WebCheckout payment gateway. 292 """ 293 294 action = 'https://newwebpay.interswitchng.com/collections/w/pay' 295 currency = '566' 296 pay_item_id = PAY_ITEM_ID 297 merchant_code = MERCHANT_CODE 298 299 class CustomWebCheckoutConfirmTransactionStudent(WebCheckoutConfirmTransactionStudent): 300 """ Request webservice view for the WebCheckout gateway 301 """ 302 merchant_code = MERCHANT_CODE 303 gateway_host = 'webpay.interswitchng.com' 304 gateway_url = '/collections/api/v1/gettransaction.json' 305 https = True 306 307 class CustomWebCheckoutConfirmTransactionApplicant(WebCheckoutConfirmTransactionApplicant): 308 """ Request webservice view for the WebCheckout gateway 309 """ 310 merchant_code = MERCHANT_CODE 311 gateway_host = 'webpay.interswitchng.com' 312 gateway_url = '/collections/api/v1/gettransaction.json' 313 https = True 314 315 -
main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interswitch/tests.py
r17703 r17927 50 50 def setUp(self): 51 51 super(InterswitchTestsStudents, self).setUp() 52 self.app['configuration']['2004'].interswitch_enabled = True 52 53 53 54 def test_interswitch_form(self): -
main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/students/tests/test_export.py
r17292 r17927 51 51 'emp2_position,emp2_reason,emp2_start,emp_end,emp_position,' 52 52 'emp_reason,emp_start,employer,employer2,' 53 'final_clearance_date,finally_cleared_by,' 53 54 'financial_clearance_date,financially_cleared_by,' 54 55 'firstname,flash_notice,former_matric,' … … 67 68 'current_level,current_session\r\nmy adm code,,,,' 68 69 '"[(\'printing_craft_practice\', \'A1\')]",my clr code,1981-02-04#,,,' 69 'anna@sample.com,,,,,,,,,,,,, Anna,,,,,,"[(\'printing_craft_practice\', \'A1\')]"'70 'anna@sample.com,,,,,,,,,,,,,,,Anna,,,,,,"[(\'printing_craft_practice\', \'A1\')]"' 70 71 ',,,,,,,,,,,,,,,,Tester,,,234,M.,NG,,,,,,,,,,' 71 72 '"Studentroad 21\nLagos 123456\n",,+234-123-12345#,,,123,,,,,'
Note: See TracChangeset for help on using the changeset viewer.