Ignore:
Timestamp:
28 Oct 2008, 14:57:23 (16 years ago)
Author:
Henrik Bettermann
Message:

first customizations for FCE Oyo payments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_fceoyo/pay_interswitch.py

    r3714 r3739  
    4848    return context.interswitch_form(info=info)
    4949
    50 info['site_id'] = '83'
     50info['site_id'] = '115'
    5151info['currency_id'] = '566'
     52pay_item_id = "11500"
    5253
    53 pay_item_id = "8302"
    5454#info['type_code'] = sbrain.course  #type_code is redundant and will be removed soon
    5555info['bank'] = ''
     
    6767now = DateTime.DateTime()
    6868info['date'] = now
    69 info['pay_ship_to'] = "Federal College of Education Okene"
     69info['pay_ship_to'] = "Federal College of Education Oyo"
    7070timestamp = "%d" % int(now.timeTime()*1000)
    7171info['order_id'] = "%s%s" % (student_id[1:],timestamp)
     
    7373
    7474
    75 info['surcharge'] = interswitch_amount = '150'
     75info['surcharge'] = interswitch_amount = '300'
    7676info['amount'] = amount = fee_dict['all']
    7777total_amount = 100*int(amount) + 100*int(interswitch_amount)
     
    8282
    8383if True:
    84     info['action'] = "https://webpay.interswitchng.com/paydirect/webpay/pay.aspx"
     84    info['action'] = "https://webpay.interswitchng.com/test_paydirect/webpay/pay.aspx"
    8585else:
    8686    #pass
     
    128128    args[arg] = info[field]
    129129
     130bt_amount = 1750
     131
     132fceoyo_amount = amount - bt_amount   # das ist falsch hier
     133
     134xmldict = {}
     135xmldict['detail_ref'] = args['txn_ref']
     136xmldict['department'] = student_record.department
     137xmldict['faculty'] = student_record.faculty
     138xmldict['fceoyo_amount'] = "%d" % int(100*fceoyo_amount)
     139xmldict['bt_amount'] = "%d" % int(100*bt_amount)
     140
     141if student_record.mode.endswith('_pt'):
     142    xmldict['fceoyo_acct'] = "0321100000000046"
     143elif student_record.mode.endswith('_sw'):
     144    xmldict['fceoyo_acct'] = "0321100000000056"
     145else:
     146    xmldict['fceoyo_acct'] = "0000000000000000"
     147
     148
     149xmltext = """<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
     156info['xml_data'] = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
     157
    130158args['Amount'] = "%d" % (total_amount)
    131 args['site_name'] = "fceokene.waeup.org"
     159args['site_name'] = "fceoyo.waeup.org"
    132160args['cust_name_desc'] = "Student Name"
    133161args['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'] = ''
     162args['pay_item_name'] = "FCE Oyo Tuition Payments"
     163args['payment_params'] = 'college_split'
     164#args['xml_data'] = ''
     165#args['xml_data'] = xmltext   # info['xml_data']can be used instead
    137166info['args'] = args
     167
    138168return context.goto_interswitch_form(info=info)
     169
Note: See TracChangeset for help on using the changeset viewer.