Changeset 3739 for WAeUP_SRP/trunk/skins/waeup_fceoyo/pay_interswitch.py
- Timestamp:
- 28 Oct 2008, 14:57:23 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_fceoyo/pay_interswitch.py
r3714 r3739 48 48 return context.interswitch_form(info=info) 49 49 50 info['site_id'] = ' 83'50 info['site_id'] = '115' 51 51 info['currency_id'] = '566' 52 pay_item_id = "11500" 52 53 53 pay_item_id = "8302"54 54 #info['type_code'] = sbrain.course #type_code is redundant and will be removed soon 55 55 info['bank'] = '' … … 67 67 now = DateTime.DateTime() 68 68 info['date'] = now 69 info['pay_ship_to'] = "Federal College of Education O kene"69 info['pay_ship_to'] = "Federal College of Education Oyo" 70 70 timestamp = "%d" % int(now.timeTime()*1000) 71 71 info['order_id'] = "%s%s" % (student_id[1:],timestamp) … … 73 73 74 74 75 info['surcharge'] = interswitch_amount = ' 150'75 info['surcharge'] = interswitch_amount = '300' 76 76 info['amount'] = amount = fee_dict['all'] 77 77 total_amount = 100*int(amount) + 100*int(interswitch_amount) … … 82 82 83 83 if True: 84 info['action'] = "https://webpay.interswitchng.com/ paydirect/webpay/pay.aspx"84 info['action'] = "https://webpay.interswitchng.com/test_paydirect/webpay/pay.aspx" 85 85 else: 86 86 #pass … … 128 128 args[arg] = info[field] 129 129 130 bt_amount = 1750 131 132 fceoyo_amount = amount - bt_amount # das ist falsch hier 133 134 xmldict = {} 135 xmldict['detail_ref'] = args['txn_ref'] 136 xmldict['department'] = student_record.department 137 xmldict['faculty'] = student_record.faculty 138 xmldict['fceoyo_amount'] = "%d" % int(100*fceoyo_amount) 139 xmldict['bt_amount'] = "%d" % int(100*bt_amount) 140 141 if student_record.mode.endswith('_pt'): 142 xmldict['fceoyo_acct'] = "0321100000000046" 143 elif student_record.mode.endswith('_sw'): 144 xmldict['fceoyo_acct'] = "0321100000000056" 145 else: 146 xmldict['fceoyo_acct'] = "0000000000000000" 147 148 149 xmltext = """<payment_item_detail> 150 <item_details detail_ref="%(detail_ref)s" college="fceoyo" department="%(department)s" faculty="%(faculty)s"> 151 <item_detail item_id="1" item_name="fceoyo" item_amt="%(fceoyo_amount)s" bank_id="89" acct_num="%(fceoyo_acct)s" /> 152 <item_detail item_id="2" item_name="BT" item_amt="%(bt_amount)s" bank_id="89" acct_num="0061001000021095" /> 153 </item_details> 154 </payment_item_detail>""" % xmldict 155 156 info['xml_data'] = """<input type="hidden" name="xml_data" value='%s' />""" % xmltext 157 130 158 args['Amount'] = "%d" % (total_amount) 131 args['site_name'] = "fceo kene.waeup.org"159 args['site_name'] = "fceoyo.waeup.org" 132 160 args['cust_name_desc'] = "Student Name" 133 161 args['pay_item_id'] = pay_item_id 134 args['pay_item_name'] = "FCEOKENE Tuition Payments" 135 args['payment_params'] = 'switch_college_split' 136 args['xml_data'] = '' 162 args['pay_item_name'] = "FCE Oyo Tuition Payments" 163 args['payment_params'] = 'college_split' 164 #args['xml_data'] = '' 165 #args['xml_data'] = xmltext # info['xml_data']can be used instead 137 166 info['args'] = args 167 138 168 return context.goto_interswitch_form(info=info) 169
Note: See TracChangeset for help on using the changeset viewer.