- Timestamp:
- 13 Sep 2024, 10:45:39 (3 months ago)
- Location:
- main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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):
Note: See TracChangeset for help on using the changeset viewer.