Changeset 1257 for WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py
- Timestamp:
- 10 Jan 2007, 09:02:02 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py
r1243 r1257 13 13 """ 14 14 import logging 15 from urllib import urlencode 15 16 logger = logging.getLogger('EPayment.') 16 17 import DateTime … … 34 35 ## sfc = res[0].getPath().split('/')[-4] 35 36 info = {} 37 info['site_id'] = '8000' 38 info['currency_id'] = '566' 36 39 info['amount'] = amount 37 40 info['type_code'] = sbrain.faculty … … 55 58 else: 56 59 payments = getattr(student,'payments') 60 if request.has_key('epayment'): 61 return context.wema_form(info=info) 62 57 63 p_id = "p%s" % order_id 58 64 payments.invokeFactory('Payment', p_id) … … 69 75 info['action'] = "%s/payments/%s/simulate_callback" % (student.absolute_url(),p_id) 70 76 logger.info('"%(student_id)s","%(type_description)s", "%(amount)s N"' % info) 71 return context.wema_form(info=info) 77 payment_fields = (('x_SiteID','site_id'), 78 ('x_Redirect_url','callback_url'), 79 ('x_CurrencyID','currency_id'), 80 ('x_PaymentCode','type_code'), 81 ('x_PayDesc','type_description'), 82 ('x_Billto','pay_bill_to'), 83 ('x_Shipto','pay_ship_to'), 84 ('x_PayerID','student_id'), 85 ('x_PayerNames','student_name'), 86 ('x_PayerEmail','student_email'), 87 ('x_OrderID','order_id'), 88 ('x_amt','amount'), 89 ) 90 args = {} 91 for arg,field in payment_fields: 92 args[arg] = info[field] 93 url = info['action'] + "?" + urlencode(args) 94 request.RESPONSE.redirect(url) 95
Note: See TracChangeset for help on using the changeset viewer.