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 |
---|
| 7 | ##parameters=paytype,student,payment_id |
---|
| 8 | ##title= |
---|
| 9 | ## |
---|
| 10 | # $Id: getInterswitchParams.py 2857 2007-12-04 16:28:13Z joachim $ |
---|
| 11 | |
---|
| 12 | test = "simulate" |
---|
| 13 | d = {} |
---|
| 14 | d['payment_possible'] = True |
---|
| 15 | d['pay_ship_to'] = "Federal College Okene" |
---|
| 16 | |
---|
| 17 | d['site_id'] = '83' |
---|
| 18 | d['site_name'] = "fceokene.waeup.org" |
---|
| 19 | d['currency_id'] = '566' |
---|
| 20 | d['type'] = 'online' |
---|
| 21 | d['status'] = 'started' |
---|
| 22 | d['surcharge'] = '150' |
---|
| 23 | d['payment_params'] = 'switch_college_split' |
---|
| 24 | if test == 'simulate': |
---|
| 25 | d['action'] = "%s/payments/%s/simulate_callback" % (student.absolute_url(),payment_id) |
---|
| 26 | elif test == 'test': |
---|
| 27 | d['action'] = "https://webpay.interswitchng.com/testpaydirect/webpay/pay.aspx" |
---|
| 28 | else: |
---|
| 29 | d['action'] = "https://webpay.interswitchng.com/paydirect/webpay/pay.aspx" |
---|
| 30 | if paytype in ("HOM",): |
---|
| 31 | d['callback_function'] = 'interswitch_acco_cb' |
---|
| 32 | d['pay_item_id'] = '8302' |
---|
| 33 | d['description'] = d['type_description'] = 'Hostel Maintenance Fee' |
---|
| 34 | d['pay_item_name'] = "FCE Okene %(description)s" % d |
---|
| 35 | d['amount'] = '4000' |
---|
| 36 | d['subject'] = 'hostel_maintenance' |
---|
| 37 | d['target'] = paytype |
---|
| 38 | |
---|
| 39 | return d |
---|
Note: See
TracBrowser for help on using the repository browser.