- Timestamp:
- 3 Dec 2015, 17:37:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py
r13527 r13532 45 45 HTTPS = True 46 46 47 URL = '/paydirect/services/TransactionQueryWs.asmx'48 47 httplib.HTTPSConnection.debuglevel = 0 49 48 … … 54 53 return 0.0 55 54 56 def contr_agreement(student): 55 def contr_agreement_applicant(applicant): 56 if applicant.__parent__.code[:2] in ('fp', 'pt'): 57 return 'first' 58 return 'second' 59 60 def contr_agreement_student(student): 57 61 if student.current_mode == 'found' or student.current_mode.endswith('_pt'): 58 62 return 'first' … … 69 73 site_name = SITE_NAME 70 74 currency = CURRENCY 71 pay_item_id = '101'72 product_id = PRODUCT_ID_PT73 75 mac = '74424F1DFECD6058F153148255CDD55E16724B4F380ADB2C63C5D1D7A5675759010C8153DCB930AAF2D38903CBF7CE32B8A6BA2C16BBC46721DF2E3F3E4548E3' 74 76 … … 80 82 self.redirect(self.url(self.context, '@@index')) 81 83 return 84 if contr_agreement_applicant(self.context.__parent__) == 'first': 85 self.product_id = PRODUCT_ID_PT 86 self.pay_item_id = '101' 87 else: 88 self.product_id = PRODUCT_ID_REGULAR 89 self.pay_item_id = '109' 82 90 xmldict = {} 83 91 provider_amt = 1000.0 … … 91 99 xmldict['institution_amt'] = 100 * ( 92 100 self.context.amount_auth - provider_amt - GATEWAY_AMT) 93 xmldict['institution_item_name'] = self.c ontext.p_category101 xmldict['institution_item_name'] = self.category 94 102 xmldict['institution_name'] = INSTITUTION_NAME 95 103 # Interswitch amount is not part of the xml data … … 106 114 hashargs = ( 107 115 self.context.p_id + 108 PRODUCT_ID_PT+116 self.product_id + 109 117 self.pay_item_id + 110 118 str(int(self.amount_auth)) + … … 123 131 site_name = SITE_NAME 124 132 currency = CURRENCY 125 pay_item_id = '101'133 #pay_item_id = '101' 126 134 #mac = '74424F1DFECD6058F153148255CDD55E16724B4F380ADB2C63C5D1D7A5675759010C8153DCB930AAF2D38903CBF7CE32B8A6BA2C16BBC46721DF2E3F3E4548E3' 127 135 mac = '9718FA00B0F5070B388A9896ADCED9B2FB02D30F71E12E68BDADC63F6852A3496FF97D8A0F9DA9F753B911A49BB09BB87B55FD02046BD325C74C46C0123CF023' … … 148 156 self.redirect(self.url(self.context, '@@index')) 149 157 return 150 if contr_agreement (student) == 'first':158 if contr_agreement_student(student) == 'first': 151 159 self.product_id = PRODUCT_ID_PT 152 160 else: … … 187 195 # Schoolfee 188 196 if self.context.p_category.startswith('schoolfee'): 189 if contr_agreement (student) == 'first':197 if contr_agreement_student(student) == 'first': 190 198 # First agreement 191 199 provider_amt = 1900.0 … … 262 270 # Clearance 263 271 elif self.context.p_category.startswith('clearance'): 264 if contr_agreement (student) == 'first':272 if contr_agreement_student(student) == 'first': 265 273 # First agreement 266 274 if student.current_mode == 'found': … … 408 416 """ 409 417 grok.context(ICustomApplicantOnlinePayment) 410 product_id = PRODUCT_ID_PT411 418 gateway_host = HOST 412 gateway_url = URL419 gateway_url = '/paydirect/api/v1/gettransaction.json' 413 420 https = HTTPS 421 mac = '74424F1DFECD6058F153148255CDD55E16724B4F380ADB2C63C5D1D7A5675759010C8153DCB930AAF2D38903CBF7CE32B8A6BA2C16BBC46721DF2E3F3E4548E3' 422 423 @property 424 def product_id(self): 425 if contr_agreement_applicant(self.context.__parent__) == 'first': 426 return PRODUCT_ID_PT 427 return PRODUCT_ID_REGULAR 414 428 415 429 class CustomInterswitchPaymentRequestWebservicePageStudent( … … 425 439 @property 426 440 def product_id(self): 427 if contr_agreement (self.context.student) == 'first':441 if contr_agreement_student(self.context.student) == 'first': 428 442 return PRODUCT_ID_PT 429 443 return PRODUCT_ID_REGULAR
Note: See TracChangeset for help on using the changeset viewer.