source: WAeUP_SRP/trunk/skins/waeup_fceokene/getInterswitchParams.py @ 17718

Last change on this file since 17718 was 5519, checked in by Henrik Bettermann, 14 years ago

fceokene #175

File size: 1.4 KB
RevLine 
[5519]1## Script (Python) "getInterswitchParams"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=paytype,student,payment_id,student_record
8##title=
9##
10# $Id: getInterswitchParams.py 3625 2008-08-17 07:47:00Z henrik $
11
12
13test = ""
14d = {}
15d['payment_possible'] = True
16d['pay_ship_to'] = "Federal College Okene"
17
18d['site_id'] = '83'
19d['site_name'] = "fceokene.waeup.org"
20d['currency_id'] = '566'
21d['type'] = 'online'
22d['status'] = 'started'
23d['surcharge'] = '150'
24if test == 'simulate':
25    d['action'] = "%s/payments/%s/simulate_callback" % (student.absolute_url(),payment_id) #do not use simulate_callback
26elif test == 'test':
27    d['action'] = "https://webpay.interswitchng.com/test_paydirect/webpay/pay.aspx"
28else:
29    d['action'] = "https://webpay.interswitchng.com/paydirect/webpay/pay.aspx"
30if paytype in ("HOM",):
31    d['callback_function'] = 'interswitch_cb'
32    d['pay_item_id'] = '8300'
33    d['type_description'] = 'Hostel Maintenance Fee'
34    d['pay_item_name'] = "FCE Okene %(type_description)s" % d
35    if student_record.mode.endswith('_sw') or student_record.mode == 'pd_ft':
36        d['amount'] = '2500'
37    else:
38        d['amount'] = '4000'
39    d['category'] = 'hostel_maintenance'
40    d['item'] = paytype
41    #d['payment_params'] = 'switch_college_split'
42    d['payment_params'] = '0'
43
44return d
Note: See TracBrowser for help on using the repository browser.