Changeset 1257 for WAeUP_SRP/trunk/skins
- Timestamp:
- 10 Jan 2007, 09:02:02 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_epayment
- Files:
-
- 3 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 -
WAeUP_SRP/trunk/skins/waeup_epayment/payments_view.pt
r1247 r1257 37 37 38 38 <form tal:attributes="action string: ${context/absolute_url}/pay_online" method="post" class="group"> 39 <input type="submit" class="context" value="Initiate School Fee Online Payment" /> 39 <input type="submit" name="epayment" 40 class="context" 41 value="Initiate School Fee Online Payment" 42 /> 40 43 </form> 41 44 -
WAeUP_SRP/trunk/skins/waeup_epayment/wema_form.pt
r1247 r1257 6 6 <br /> 7 7 8 <form method="post" action="http://www.wemaonlinepayments.biz/payment.aspx" 9 tal:attributes="action info/action"> 10 <input name="x_SiteID" type="hidden" id="x_SiteID" value="8000"/> 11 <input name="x_Redirect_url" type="hidden" id="x_Redirect_url" 12 value="http://uniben.waeup.org/callback" 13 tal:attributes="value info/callback_url" 14 /> 15 <input name="x_CurrencyID" type="hidden" value="566" /> 8 <form method="post" action="pay_online"> 16 9 <table> 17 10 <tr> 18 11 <td width="100px"> 19 <input name="x_PaymentCode" type="hidden"20 tal:attributes="value info/type_code" />21 <input name="x_PayDesc" type="hidden"22 tal:attributes="value info/type_description" />23 12 Payment:</td> 24 13 <td tal:content="info/type_description"></td> … … 26 15 <tr> 27 16 <td> 28 <input name="x_Billto" type="hidden"29 tal:attributes="value info/pay_bill_to" />30 <input name="x_Shipto" type="hidden"31 tal:attributes="value info/pay_ship_to" />32 <input name="x_PayerID" type="hidden"33 tal:attributes="value info/student_id" />34 <input name="x_PayerNames" type="hidden"35 tal:attributes="value info/student_name" />36 <input name="x_PayerEmail" type="hidden"37 tal:attributes="value info/student_email" />38 <input name="x_OrderID" type="hidden"39 tal:attributes="value info/order_id" />40 17 Name: 41 18 </td> … … 44 21 <tr> 45 22 <td > 46 <input name="x_amt" type="hidden"47 tal:attributes="value info/amount" />48 23 Amount: 49 24 </td> … … 58 33 </table> 59 34 <br /> 60 <input type="submit" class="standalone" name="btnPostPopup" 61 value="Start" 62 /> 35 <input type="submit" 36 class="standalone" 37 name="goto_bank" 38 value="Start" 39 /> 63 40 64 41 </form>
Note: See TracChangeset for help on using the changeset viewer.