Changeset 4799
- Timestamp:
- 12 Jan 2010, 20:03:22 (15 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_epayment
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_epayment/goto_interswitch_form.pt
r3709 r4799 12 12 <input type="hidden" tal:attributes="name python:arg[0];value python:arg[1]" /> 13 13 </span> 14 15 <span tal:replace = "structure info/xml_data" /> 16 14 17 <table> 15 18 <tr> … … 30 33 <td> Naira <span tal:content="info/amount" /></td> 31 34 </tr> 35 36 37 38 39 40 32 41 33 42 </table> … … 36 45 class="standalone" 37 46 name="goto_bank" 38 value="Proceed to Payment Gateway"47 value="Proceed to Interswitch Payment Gateway" 39 48 /> 40 49 </form> -
WAeUP_SRP/trunk/skins/waeup_epayment/pay_interswitch.py
r3709 r4799 1 ## 1 ##Script (Python) "pay_online" 2 2 ##bind container=container 3 3 ##bind context=context … … 48 48 if not fee_dict or (not new and fulltime) or not (new or returning): 49 49 return context.interswitch_form(info=info) 50 info['site_id'] = ' 61'50 info['site_id'] = '57' 51 51 info['currency_id'] = '566' 52 52 if new: … … 55 55 amount = info['amount'] = fee_dict['returning'] 56 56 if fulltime: 57 pay_item_id = " 6100"57 pay_item_id = "5700" 58 58 #info['type_code'] = student_record.faculty #type_code is redundant and will be removed soon 59 59 info['bank'] = '' 60 60 else: 61 pay_item_id = " 6101"61 pay_item_id = "5701" 62 62 #info['type_code'] = student_record.course #type_code is redundant and will be removed soon 63 63 info['bank'] = '' 64 info['surcharge'] = '0' # Uniben doesn't show the surcharge on the slip 64 65 info['payment_possible'] = True 65 66 info['type_description'] = fee_dict['description'] … … 85 86 if True or context.portal_url().find('uniben-demo.waeup.org') >-1 or\ 86 87 context.portal_url().find('uniben.waeup.org') >-1: 88 #info['action'] = "https://webpay.interswitchng.com/test_paydirect/webpay/pay.aspx" 87 89 info['action'] = "https://webpay.interswitchng.com/paydirect/webpay/pay.aspx" 88 90 else: 89 #pass90 #return None91 91 info['action'] = "%s/payments/%s/simulate_callback" % (student.absolute_url(),p_id) 92 92 … … 110 110 d = {} 111 111 d.update(info) 112 #from Products.zdb import set_trace;set_trace()113 112 payment.getContent().edit(mapping=d) 114 #wftool.doActionFor(payment,'close')115 #wftool.doActionFor(student,'pay_school_fee')116 113 info['callback_url'] = "%s/payments/%s/interswitch_cb?echo=%s" % (student.absolute_url(), 117 114 p_id, … … 132 129 args[arg] = info[field] 133 130 itotal = int(amount)*100 134 wema_amount = 10000135 provider_amount = 35000131 fbn_amount = 10000 132 bt_amount = 75000 136 133 interswitch_amount = 15000 137 #uniben_amount = itotal - wema_amount - provider_amount - interswitch_amount 138 uniben_amount = itotal - interswitch_amount 134 uniben_amount = itotal - fbn_amount - bt_amount - interswitch_amount 139 135 xmldict = {} 140 136 xmldict['detail_ref'] = args['txn_ref'] 141 137 xmldict['department'] = student_record.department 142 138 xmldict['faculty'] = student_record.faculty 143 #xmldict['wema_amt'] = "%d" % wema_amount144 #xmldict['provider_amt'] = "%d" % provider_amount139 xmldict['fbn_amt'] = "%d" % fbn_amount 140 xmldict['bt_amt'] = "%d" % bt_amount 145 141 xmldict['uniben_amt'] = "%d" % uniben_amount 146 ##<item_detail item_id="2" item_name="WEMA" item_amt="%(wema_amt)s" bank_id="16" acct_num="48398023902" /> 147 ##<item_detail item_id="3" item_name="Portal Provider" item_amt="%(provider_amt)s" bank_id="47" acct_num="0980938209483" /> 148 xmltext = """ 149 <payment_item_detail> 150 <item_details detail_ref="%(detail_ref)s" college="UNIBEN" department="%(department)s" 151 faculty="%(faculty)s"> 152 <item_detail item_id="1" item_name="UNIBEN" item_amt="%(uniben_amt)s" bank_id="16" acct_num="384950902390" /> 142 #Full and Part-time students School Fees go into different Accounts 143 if student_record.mode.endswith('_ft'): 144 xmldict['uniben_acct'] = "6162030000198" 145 xmldict['bank_id'] = '8' 146 else: 147 xmldict['uniben_acct'] = "6162030000277" 148 xmldict['bank_id'] = '8' 149 150 xmltext = """<payment_item_detail> 151 <item_details detail_ref="%(detail_ref)s" college="UNIBEN" department="%(department)s" faculty="%(faculty)s"> 152 <item_detail item_id="1" item_name="UNIBEN School Fee" item_amt="%(uniben_amt)s" bank_id="%(bank_id)s" acct_num="%(uniben_acct)s" /> 153 <item_detail item_id="2" item_name="BT" item_amt="%(bt_amt)s" bank_id="89" acct_num="0061001000021095" /> 154 <item_detail item_id="3" item_name="FBN" item_amt="%(fbn_amt)s" bank_id="8" acct_num="6162030000286" /> 153 155 </item_details> 154 </payment_item_detail> 155 """ % xmldict 156 #total = int(xmldict['uniben_amt'])+int(xmldict['wema_amt'])+int(xmldict['provider_amt']) 157 total = int(xmldict['uniben_amt']) 158 args['Amount'] = "%d" % ( total + 15000)156 </payment_item_detail>""" % xmldict 157 158 info['xml_data'] = """<input type="hidden" name="xml_data" value='%s' />""" % xmltext 159 160 args['Amount'] = "%d" % (itotal) 159 161 args['site_name'] = "uniben.waeup.org" 160 162 args['cust_name_desc'] = "Student Name" 161 163 args['pay_item_id'] = pay_item_id 162 164 args['pay_item_name'] = "UNIBEN Tuition Payments" 163 args['payment_params'] = ' switch_college_split'164 #args['xml_data'] = xmltext % info165 args['xml_data'] = '' 165 args['payment_params'] = 'college_split' 166 #args['xml_data'] = '' 167 #args['xml_data'] = xmltext # info['xml_data']can be used instead 166 168 info['args'] = args 169 167 170 return context.goto_interswitch_form(info=info)
Note: See TracChangeset for help on using the changeset viewer.