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