Changeset 3963 for WAeUP_SRP/trunk/skins/waeup_epayment
- Timestamp:
- 15 Feb 2009, 13:43:41 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_epayment/interswitch_cb.py
r3886 r3963 68 68 #pd['resp_code'] = '00' 69 69 #pd['resp_card_num'] = '0000' 70 #pd['resp_approved_amount'] = ' 10000'70 #pd['resp_approved_amount'] = '4680000' 71 71 72 72 if pd['resp_code'] == '00' and len(pd['resp_approved_amount']) > 4: … … 84 84 wftool.doActionFor(context,'open') 85 85 pay_doc = context.getContent() 86 pay_doc.edit(mapping = pd)87 86 resp = pd['resp_code'] 88 87 88 try: 89 amount = int(getattr(pay_doc,'amount',0)) 90 surcharge = int(getattr(pay_doc,'surcharge',0)) 91 resp_approved_amount = int(pd['resp_approved_amount']) 92 #set_trace() 93 if amount + surcharge != resp_approved_amount: 94 logger.info('Warning: %s, approved amount %s and autorized amount %s are different for payment %s of %s' % (member,resp_approved_amount,amount+surcharge,context.getId(),student_id)) 95 pd['status'] = 'failed' 96 pd['resp_desc'] = 'Warning: approved amount in callback does not match!' 97 resp = '' 98 else: 99 pass 100 except: 101 logger.info('%s: approved amount could not be verified for payment %s of %s' % (member,context.getId(),student_id)) 102 pd['status'] = 'failed' 103 pd['resp_desc'] = 'Warning: approved amount could not be verified!' 104 resp = '' 105 106 pay_doc.edit(mapping = pd) 89 107 s_brain = context.students_catalog(id=student_id)[0] 90 108 session = s_brain.session
Note: See TracChangeset for help on using the changeset viewer.