Changeset 15755 for main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/studentsbrowser.py
- Timestamp:
- 5 Nov 2019, 23:19:58 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/studentsbrowser.py
r15702 r15755 33 33 34 34 from kofacustom.nigeria.etranzact.tests import ( 35 TERMINAL_ID, HOST, HTTPS, SECRET_KEY, LOGO_URL )35 TERMINAL_ID, HOST, HTTPS, SECRET_KEY, LOGO_URL, GATEWAY_AMT) 36 36 37 37 grok.templatedir('browser_templates') … … 93 93 terminal_id = TERMINAL_ID 94 94 logo_url = LOGO_URL 95 gateway_amt = GATEWAY_AMT 95 96 96 97 @property … … 101 102 102 103 def init_update(self): 104 if not module_activated(self.context.student.current_session): 105 return _("Etranzact payments deactivated.") 103 106 if self.context.p_state == 'paid': 104 107 return _("Payment ticket can't be re-sent to Etranzact.") … … 116 119 # which authenticates the response. 117 120 self.responseurl = self.url(self.context, 'receive_etranzact') 118 # Already now it becomes a Etranzact payment 119 self.context.r_company = u'etranzact' 120 hashargs = self.amount + self.terminal_id+self.transaction_id \ 121 self.transaction_id = self.context.p_id 122 hashargs = self.amount + self.terminal_id + self.transaction_id \ 121 123 + self.responseurl + self.secret_key 122 124 self.hashvalue = hashlib.md5(hashargs).hexdigest() … … 125 127 126 128 def update(self): 127 if not module_activated(self.context.student.current_session): 128 return 129 self.transaction_id = self.context.p_id 129 # Already now it becomes an Etranzact payment. We set the net amount 130 # and add the gateway amount. 131 if not self.context.r_company: 132 self.context.net_amt = self.context.amount_auth 133 self.context.amount_auth += self.gateway_amt 134 self.context.gateway_amt = self.gateway_amt 135 self.context.r_company = u'etranzact' 130 136 self.amount = "%.1f" % self.context.amount_auth 131 137 error = self.init_update()
Note: See TracChangeset for help on using the changeset viewer.