Changeset 2891 for WAeUP_SRP/base/skins/waeup_epayment
- Timestamp:
- 9 Dec 2007, 11:03:55 (17 years ago)
- Location:
- WAeUP_SRP/base/skins/waeup_epayment
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_epayment/interswitch_acco_cb.py
r2857 r2891 53 53 for rc,pdk in resp_codes: 54 54 pd[pdk] = request.get(rc,'') 55 56 57 ## for testing purposes 58 pd['resp_desc'] = 'Simulated Callback' 59 pd['resp_pay_reference'] = 'XXXX' 60 pd['resp_code'] = '00' 61 pd['resp_card_num'] = '0000' 62 pd['resp_approved_amount'] = '10000' 55 63 56 64 if pd['resp_code'] == '00' and len(pd['resp_approved_amount']) > 4: 57 65 pd['resp_approved_amount'] = pd['resp_approved_amount'][:-2] 66 pd['status'] = 'paid' 58 67 else: 59 68 pd['resp_approved_amount'] = '0' 69 pd['status'] = 'failed' 60 70 61 71 review_state = wftool.getInfoFor(context,'review_state',None) … … 86 96 else: 87 97 logger.info('%s received unsuccessfull callback: %s' % (student_id,pd['resp_desc'])) 98 99 try: 100 wftool.doActionFor(context,'close') 101 except: 102 logger.info('%s no workflow action close' % student_id) 88 103 try: 89 104 wftool.doActionFor(acco_info['acco'],'pay_maintenance_fee',dest_container=acco_info['acco']) … … 92 107 logger.info('%s no workflow action pay_maintainance_fee' % student_id) 93 108 return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url()) 94 95 else: 109 110 111 else: 96 112 next_info = context.getNextInfo(s_brain) 97 113 next_session_id = next_info['next_session_id'] … … 101 117 next_verdict = next_info['next_verdict'] 102 118 next_previous_verdict = next_info['next_previous_verdict'] 103 119 104 120 if resp == '00': 105 121 if context.getStudentReviewState() == "school_fee_paid": … … 121 137 if next_transition: 122 138 wftool.doActionFor(student,next_transition) 123 139 124 140 logger.info('%s received valid callback' % student_id) 125 141 referer = request.get('HTTP_REFERER','none') … … 133 149 except: 134 150 logger.info('%s no workflow action close' % student_id) 135 136 151 152 -
WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py
r2881 r2891 106 106 info['status'] = 'paid' 107 107 info['session_id'] = student_record.session 108 info[' target'] = student_record.course109 info[' subject'] = 'schoolfee'108 info['item'] = student_record.course 109 info['category'] = 'schoolfee' 110 110 info['resp_code'] = "SC" 111 111 info['resp_desc'] = "SC Payment Successful" -
WAeUP_SRP/base/skins/waeup_epayment/pay_interswitch_acco.py
r2877 r2891 19 19 from urllib import urlencode 20 20 import logging 21 logger = logging.getLogger('Skins.pay_interswitch ')21 logger = logging.getLogger('Skins.pay_interswitch_acco') 22 22 import DateTime 23 23 … … 75 75 info['student_id'] = student_id 76 76 info['student_name'] = student_record.name 77 info['session_id'] = student_record.session 77 78 info['student_email'] = student_record.email 78 79 info['date'] = now … … 105 106 payment_id) 106 107 107 logger.info('%(student_id)s initiated %( description)s payment with order_id %(order_id)s and callback url %(callback_url)s' % info)108 logger.info('%(student_id)s initiated %(type_description)s payment with order_id %(order_id)s and callback url %(callback_url)s' % info) 108 109 payment_fields = (('product_id','site_id'), 109 110 ('site_name','site_name'), -
WAeUP_SRP/base/skins/waeup_epayment/payment_receipt.pt
r2885 r2891 20 20 </tr> 21 21 <tr> 22 <td> JAMBRegistration Number:</td>22 <td>Registration Number:</td> 23 23 <td tal:content="student/jamb_reg_no" /> 24 24 </tr> -
WAeUP_SRP/base/skins/waeup_epayment/simulate_callback.py
r2857 r2891 13 13 current = DateTime.DateTime() 14 14 pr = context.portal_registration 15 logger = logging.getLogger(' EPayment.Simulate')15 logger = logging.getLogger('Skins.simulate_callback') 16 16 17 17 args = {} … … 24 24 #set_trace() 25 25 #url = "%s" % (context.absolute_url()) 26 raw_url = REQUEST.get("site_redirect_url") 26 raw_url = REQUEST.get("site_redirect_url") 27 27 url = "%s&%s" % (raw_url,urlencode(args)) 28 28 return REQUEST.RESPONSE.redirect(url)
Note: See TracChangeset for help on using the changeset viewer.