Changeset 3964 for WAeUP_SRP/trunk/skins/waeup_epayment
- Timestamp:
- 15 Feb 2009, 17:46:44 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_epayment/interswitch_cb.py
r3963 r3964 86 86 resp = pd['resp_code'] 87 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)) 88 if resp == '00': 89 try: 90 amount = int(getattr(pay_doc,'amount',0)) 91 surcharge = int(getattr(pay_doc,'surcharge',0)) 92 resp_approved_amount = int(pd['resp_approved_amount']) 93 #set_trace() 94 if amount + surcharge != resp_approved_amount: 95 logger.info('Warning: %s, approved amount %s and authorized amount %s are different for payment %s of %s' % (member,resp_approved_amount,amount+surcharge,context.getId(),student_id)) 96 pd['status'] = 'failed' 97 pd['resp_desc'] = 'Warning: approved amount in callback does not match!' 98 resp = '' 99 else: 100 pass 101 except: 102 logger.info('%s: approved amount could not be verified for payment %s of %s' % (member,context.getId(),student_id)) 95 103 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 = '' 104 pd['resp_desc'] = 'Warning: approved amount could not be verified!' 105 resp = '' 105 106 106 107 pay_doc.edit(mapping = pd)
Note: See TracChangeset for help on using the changeset viewer.