- Timestamp:
- 6 Nov 2019, 07:25:16 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.skeleton/trunk/src/kofacustom/skeleton/etranzact/browser.py
r15615 r15756 23 23 EtranzactPageStudent, EtranzactReceiveResponseStudent, 24 24 EtranzactRequestPaymentStatusPageStudent) 25 from kofacustom.nigeria.etranzact.payoutletbrowser import ( 26 EtranzactEnterPinPageStudent, EtranzactEnterPinPageApplicant, 27 EtranzactQueryHistoryPageStudent, EtranzactQueryHistoryPageApplicant) 28 from kofacustom.nigeria.etranzact.payoutletwebservice import NigeriaPaymentDataWebservice 25 29 26 30 # Temporarily we can use the test portal like in kofacustom.nigeria 27 31 28 32 from kofacustom.nigeria.etranzact.tests import ( 29 HOST, HTTPS, SECRET_KEY, TERMINAL_ID )33 HOST, HTTPS, SECRET_KEY, TERMINAL_ID, GATEWAY_AMT) 30 34 31 35 #HOST = … … 33 37 #SECRET_KEY = 34 38 #TERMINAL_ID = 39 #GATEWAY_AMT = 35 40 LOGO_URL = 'https://iuokada.waeup.org/static_custom/iou_logo.png' 36 41 … … 42 47 terminal_id = TERMINAL_ID 43 48 logo_url = LOGO_URL 49 gateway_amt = GATEWAY_AMT 50 51 def update(self): 52 # Already now it becomes an Etranzact payment. We set the net amount 53 # and add the gateway amount. 54 if not self.context.r_company: 55 self.context.net_amt = self.context.amount_auth 56 self.context.amount_auth += self.gateway_amt 57 self.context.gateway_amt = self.gateway_amt 58 self.context.r_company = u'etranzact' 59 self.amount = "%.1f" % self.context.amount_auth 60 error = self.init_update() 61 if error: 62 self.flash(error, type='danger') 63 self.redirect(self.url(self.context, '@@index')) 64 return 65 return 44 66 45 67 class CustomEtranzactReceiveResponseApplicant(EtranzactReceiveResponseApplicant): … … 64 86 terminal_id = TERMINAL_ID 65 87 logo_url = LOGO_URL 88 gateway_amt = GATEWAY_AMT 89 90 def update(self): 91 # Already now it becomes an Etranzact payment. We set the net amount 92 # and add the gateway amount. 93 if not self.context.r_company: 94 self.context.net_amt = self.context.amount_auth 95 self.context.amount_auth += self.gateway_amt 96 self.context.gateway_amt = self.gateway_amt 97 self.context.r_company = u'etranzact' 98 self.amount = "%.1f" % self.context.amount_auth 99 error = self.init_update() 100 if error: 101 self.flash(error, type='danger') 102 self.redirect(self.url(self.context, '@@index')) 103 return 104 return 66 105 67 106 class CustomEtranzactReceiveResponseStudent(EtranzactReceiveResponseStudent): … … 79 118 logo_url = LOGO_URL 80 119 120 # Payoutlet customizations 81 121 122 class CustomEtranzactEnterPinPageStudent(EtranzactEnterPinPageStudent): 123 """Enter confirmation PIN and submit to `EtranzactQueryHistoryPageStudent` 124 """ 125 gateway_amt = GATEWAY_AMT 82 126 127 class CustomEtranzactEnterPinPageApplicant(EtranzactEnterPinPageApplicant): 128 """Enter confirmation PIN and submit to `EtranzactQueryHistoryPageApplicant` 129 """ 130 gateway_amt = GATEWAY_AMT 131 132 class CustomEtranzactQueryHistoryPageStudent(EtranzactQueryHistoryPageStudent): 133 """ Query history of Etranzact payments 134 """ 135 terminal_id = TERMINAL_ID 136 host = HOST 137 https = HTTPS 138 139 class CustomEtranzactQueryHistoryPageApplicant(EtranzactQueryHistoryPageApplicant): 140 """ Query history of Etranzact payments 141 """ 142 terminal_id = TERMINAL_ID 143 host = HOST 144 https = HTTPS 145 146 class CustomPaymentDataWebservice(NigeriaPaymentDataWebservice): 147 """A simple webservice to publish payment and payer details on request from 148 accepted IP addresses without authentication. 149 """ 150 #ACCEPTED_IP = ('195.219.3.181', '195.219.3.184') 151 ACCEPTED_IP = None 152 153 CATEGORY_MAPPING = { 154 'SCHOOLFEE': ('schoolfee',), 155 } 156
Note: See TracChangeset for help on using the changeset viewer.