Changeset 1937
- Timestamp:
- 19 Jun 2007, 17:12:59 (17 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_epayment
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_epayment/goto_interswitch_form.pt
r1885 r1937 34 34 Bank: 35 35 </td> 36 <td> Bank</td>36 <td>Wema Bank</td> 37 37 </tr> 38 38 </table> -
WAeUP_SRP/trunk/skins/waeup_epayment/interswitch_cb.py
r1892 r1937 12 12 payment callback 13 13 """ 14 try: 15 from Products.zdb import set_trace 16 except: 17 def set_trace(): 18 pass 14 19 import logging 15 20 logger = logging.getLogger('Skins.epayment_cb') … … 47 52 #from Products.zdb import set_trace;set_trace() 48 53 for rc,pdk in resp_codes: 49 pd[pdk] = request.get(rc) 54 pd[pdk] = request.get(rc,'') 55 if pd['resp_code'] == '00' and len(pd['resp_approved_amount']) > 4: 56 pd['resp_approved_amount'] = pd['resp_approved_amount'][:-2] 57 else: 58 pd['resp_approved_amount'] = '0' 50 59 try: 51 60 context.getContent().edit(mapping=pd) -
WAeUP_SRP/trunk/skins/waeup_epayment/interswitch_form.pt
r1927 r1937 29 29 Bank: 30 30 </td> 31 <td> Bank</td>31 <td>Wema Bank</td> 32 32 </tr> 33 33 </table> -
WAeUP_SRP/trunk/skins/waeup_epayment/pay_interswitch.py
r1892 r1937 104 104 for arg,field in payment_fields: 105 105 args[arg] = info[field] 106 itotal = int(amount)*100 107 wema_amount = 10000 108 provider_amount = 35000 109 interswitch_amount = 15000 110 #uniben_amount = itotal - wema_amount - provider_amount - interswitch_amount 111 uniben_amount = itotal - interswitch_amount 106 112 xmldict = {} 107 113 xmldict['detail_ref'] = args['txn_ref'] 108 114 xmldict['department'] = sbrain.department 109 115 xmldict['faculty'] = sbrain.faculty 110 xmldict['uniben_amt'] = "%s00" % amount 111 xmldict['wema_amt'] = "10000" 112 xmldict['provider_amt'] = "35000" 116 #xmldict['wema_amt'] = "%d" % wema_amount 117 #xmldict['provider_amt'] = "%d" % provider_amount 118 xmldict['uniben_amt'] = "%d" % uniben_amount 119 ##<item_detail item_id="2" item_name="WEMA" item_amt="%(wema_amt)s" bank_id="16" acct_num="48398023902" /> 120 ##<item_detail item_id="3" item_name="Portal Provider" item_amt="%(provider_amt)s" bank_id="47" acct_num="0980938209483" /> 113 121 xmltext = """ 114 122 <payment_item_detail> … … 116 124 faculty="%(faculty)s"> 117 125 <item_detail item_id="1" item_name="UNIBEN" item_amt="%(uniben_amt)s" bank_id="16" acct_num="384950902390" /> 118 <item_detail item_id="2" item_name="WEMA" item_amt="%(wema_amt)s" bank_id="16" acct_num="48398023902" />119 <item_detail item_id="3" item_name="Portal Provider" item_amt="%(provider_amt)s" bank_id="47" acct_num="0980938209483" />120 126 </item_details> 121 127 </payment_item_detail> 122 128 """ % xmldict 123 total = int(xmldict['uniben_amt'])+int(xmldict['wema_amt'])+int(xmldict['provider_amt']) 129 #total = int(xmldict['uniben_amt'])+int(xmldict['wema_amt'])+int(xmldict['provider_amt']) 130 total = int(xmldict['uniben_amt']) 124 131 args['Amount'] = "%d" % (total + 15000) 125 132 args['site_name'] = "uniben.waeup.org" -
WAeUP_SRP/trunk/skins/waeup_epayment/payments_view.pt
r1783 r1937 45 45 </a> 46 46 </td> 47 <td tal:condition=" nothing">47 <td tal:condition="python:1"> 48 48 <a tal:condition="row/is_requeryable" 49 tal:attributes="href string:${ context/absolute_url}/${row/id}/requery_payment;49 tal:attributes="href string:${info/query_url}?transRef=${row/trans_ref}&prodID=${info/prod_id}&${row/callback_url}; 50 50 onclick python:'return window.confirm(\'%s\')' %(cpsmcat('Are you sure? You will not be able to undo the approval.'), ); 51 51 "> … … 53 53 </a> 54 54 </td> 55 56 55 </tr> 57 56 </table> 58 57 <br /> 59 58 <div> 60 61 59 <form tal:condition="python:review_state == 'cleared_and_validated'" 62 tal:attributes="action string: ${context/absolute_url}/pay_ online" method="post" class="group">60 tal:attributes="action string: ${context/absolute_url}/pay_interswitch" method="post" class="group"> 63 61 <input type="submit" name="epayment" 64 62 class="context" 65 63 value="Initiate School Fee Online Payment" 66 64 /> 67 68 69 65 </form> 70 71 66 <form tal:condition="python:review_state == 'returning'" 72 67 tal:attributes="action string: ${context/absolute_url}/pay_by_sc" method="post" class="group"> … … 74 69 tal:attributes="value info/next_session" 75 70 /> 76 77 71 <input type="submit" name="epayment" 78 72 class="context" … … 82 76 </form> 83 77 </div> 84 85 78 </span> 86 79 </span>
Note: See TracChangeset for help on using the changeset viewer.