Changeset 1224
- Timestamp:
- 7 Jan 2007, 15:20:56 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 6 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/profiles/default/types.xml
r745 r1224 12 12 <object name="Department" meta_type="CPS Flexible Type Information"/> 13 13 <object name="Faculty" meta_type="CPS Flexible Type Information"/> 14 <object name="PaymentsFolder" meta_type="CPS Flexible Type Information"/> 15 <object name="Payment" meta_type="CPS Flexible Type Information"/> 14 16 <object name="ScratchCardBatch" meta_type="CPS Flexible Type Information"/> 15 17 <object name="ScratchCardBatchesFolder" meta_type="CPS Flexible Type Information"/> -
WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py
r1158 r1224 15 15 logger = logging.getLogger('EPayment.') 16 16 import DateTime 17 import time 17 18 18 19 request = context.REQUEST … … 31 32 sfc = res[0].getObject().getContent().school_fee_code 32 33 info = {} 33 info['callback_url'] = "%s/epayment_cb" % student.absolute_url() 34 info['payment_type_code'] = sfc 35 info['payment_type_description'] = "Schoolfee %s for 2006/2007 Session" % sfc 36 info['payment_bill_to'] = sbrain.name 37 info['payment_ship_to'] = "University of Benin" 34 info['type_code'] = "ART" #sfc 35 info['type_description'] = "Schoolfee %s for 2006/2007 Session" % sfc 36 info['pay_bill_to'] = sbrain.name 37 info['pay_ship_to'] = "University of Benin" 38 38 info['student_id'] = student_id 39 39 info['student_name'] = sbrain.name 40 40 info['student_email'] = sbrain.email 41 info['order_id'] = "%s%s" % (student_id[1:],DateTime.DateTime().strftime("%d%m%y%H%M%S")) 41 info['pay_date'] = DateTime.DateTime().strftime("%d%m%y%H%M%S") 42 order_id = info['order_id'] = "%d" % int(time.time()*1000) 43 info['order_id'] = "%s%s" % (student_id[1:],order_id) 42 44 info['amount'] = "75000" 45 if "payments" not in student.objectIds(): 46 student.invokeFactory('PaymentsFolder','payment') 47 payments = getattr(student,'payments') 48 d = {} 49 d['Title'] = 'Online Payments' 50 payment.getContent().edit(mapping=d) 51 else: 52 payments = getattr(student,'payments') 53 p_id = "p%s" % order_id 54 payments.invokeFactory('Payment', p_id) 55 payment = getattr(payments,p_id) 56 d = {} 57 d.update(info) 58 d['Title'] = "%(payment_type_description)s %(pay_date) %(amount)s N" % info 59 payment.getContent().edit(mapping=d) 60 info['callback_url'] = "%s/payments/%s/epayment_cb" % (student.absolute_url(),p_id) 61 logger.info('"%(student_id)s","%(payment_type_description)s", "%(amount)s N"' % info) 43 62 return context.wema_form(info=info)
Note: See TracChangeset for help on using the changeset viewer.