Line | |
---|
1 | ##parameters=REQUEST |
---|
2 | # $Id: simulate_callback.py 2857 2007-12-04 16:28:13Z joachim $ |
---|
3 | """ |
---|
4 | simulate a callback |
---|
5 | """ |
---|
6 | try: |
---|
7 | from Products.zdb import set_trace |
---|
8 | except: |
---|
9 | def set_trace(): |
---|
10 | pass |
---|
11 | |
---|
12 | import DateTime,logging |
---|
13 | current = DateTime.DateTime() |
---|
14 | pr = context.portal_registration |
---|
15 | logger = logging.getLogger('EPayment.Simulate') |
---|
16 | |
---|
17 | args = {} |
---|
18 | args['desc'] = 'Simulated Callback' |
---|
19 | args['PayRef'] = 'GTB|WEB|ISW|1-01-2000|000234' |
---|
20 | args['resp'] = '00' |
---|
21 | args['cardNum'] = '0000' |
---|
22 | args['ApprAmt'] = REQUEST.get('x_amt') |
---|
23 | from urllib import urlencode |
---|
24 | #set_trace() |
---|
25 | #url = "%s" % (context.absolute_url()) |
---|
26 | raw_url = REQUEST.get("site_redirect_url") |
---|
27 | url = "%s&%s" % (raw_url,urlencode(args)) |
---|
28 | return REQUEST.RESPONSE.redirect(url) |
---|
Note: See
TracBrowser for help on using the repository browser.