Changeset 1243 for WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py
- Timestamp:
- 8 Jan 2007, 17:39:17 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py
r1235 r1243 24 24 student = getattr(students,student_id) 25 25 sbrain = context.students_catalog(id=student_id)[0] 26 res = context.portal_catalog(portal_type="Certificate", 27 id = sbrain.course) 28 if not res: 29 logger.info('"%s","certificate not found", "%s"' % (student_id,course)) 30 sfc = "ART" 31 else: 32 sfc = res[0].getPath().split('/')[-4] 26 amount,description = context.getSchoolFee(sbrain.faculty) 27 ##res = context.portal_catalog(portal_type="Certificate", 28 ## id = sbrain.course) 29 ## 30 ##if not res: 31 ## logger.info('"%s","certificate not found", "%s"' % (student_id,course)) 32 ## sfc = "ART" 33 ##else: 34 ## sfc = res[0].getPath().split('/')[-4] 33 35 info = {} 34 info['amount'] = "75000"35 info['type_code'] = s fc36 info['type_description'] = "Schoolfee %s for 2006/2007 Session" % sfc36 info['amount'] = amount 37 info['type_code'] = sbrain.faculty 38 info['type_description'] = description 37 39 info['pay_bill_to'] = sbrain.name 38 40 info['pay_ship_to'] = "University of Benin" … … 41 43 info['student_email'] = sbrain.email 42 44 now = DateTime.DateTime() 43 info[' pay_date'] = now.strftime("%d%m%y%H%M%S")45 info['date'] = now 44 46 order_id = info['order_id'] = "%d" % int(now.timeTime()*1000) 45 47 info['order_id'] = "%s%s" % (student_id[1:],order_id) … … 48 50 payments = getattr(student,'payments') 49 51 d = {} 50 d['Title'] = ' OnlinePayments'52 d['Title'] = 'Payments' 51 53 payments.getContent().edit(mapping=d) 54 wftool.doActionFor(payments,'open') 52 55 else: 53 56 payments = getattr(student,'payments') 54 57 p_id = "p%s" % order_id 55 58 payments.invokeFactory('Payment', p_id) 56 #from Products.zdb import set_trace;set_trace()57 59 payment = getattr(payments,p_id) 58 60 d = {} 59 61 d.update(info) 60 d['Title'] = "%(type_description)s %(pay_date) %(amount)s N" % info 62 #from Products.zdb import set_trace;set_trace() 61 63 payment.getContent().edit(mapping=d) 62 64 info['callback_url'] = "%s/payments/%s/epayment_cb" % (student.absolute_url(),p_id) 63 if context.portal_url().find('uniben-demo.waeup.org') >-1: 65 if context.portal_url().find('uniben-demo.waeup.org') >-1 or\ 66 context.portal_url().find('uniben.waeup.org') >-1: 64 67 info['action'] = "http://www.wemaonlinepayments.biz/payment.aspx" 65 68 else:
Note: See TracChangeset for help on using the changeset viewer.