|
Last change
on this file since 3473 was
1593,
checked in by uli, 20 years ago
|
|
Merged current trunk into uli-branch.
|
|
File size:
956 bytes
|
| Rev | Line | |
|---|
| [1352] | 1 | ## Script (Python) "unpay" |
|---|
| 2 | ##bind container=container |
|---|
| 3 | ##bind context=context |
|---|
| 4 | ##bind namespace= |
|---|
| 5 | ##bind script=script |
|---|
| 6 | ##bind subpath=traverse_subpath |
|---|
| 7 | ##parameters= |
|---|
| 8 | ##title= |
|---|
| 9 | ## |
|---|
| 10 | # $Id: epayment_cb.py 1348 2007-01-25 17:06:21Z henrik $ |
|---|
| 11 | """ |
|---|
| 12 | payment callback |
|---|
| 13 | """ |
|---|
| 14 | import logging |
|---|
| [1593] | 15 | logger = logging.getLogger('Skins.unpay') |
|---|
| [1352] | 16 | import DateTime |
|---|
| 17 | |
|---|
| [1593] | 18 | pm = context.portal_membership |
|---|
| 19 | member = pm.getAuthenticatedMember() |
|---|
| 20 | |
|---|
| [1352] | 21 | request = context.REQUEST |
|---|
| 22 | students = context.portal_url.getPortalObject().campus.students |
|---|
| 23 | wftool = context.portal_workflow |
|---|
| 24 | student_id = context.getStudentId() |
|---|
| 25 | if student_id is None: |
|---|
| 26 | return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) |
|---|
| 27 | |
|---|
| 28 | student = getattr(students,student_id) |
|---|
| 29 | |
|---|
| 30 | #wftool.doActionFor(student,'return') |
|---|
| 31 | wftool.doActionFor(student,'clear_and_validate') |
|---|
| [1593] | 32 | logger.info('%s resets %s to state returning' % (member,student_id)) |
|---|
| [1352] | 33 | |
|---|
| 34 | return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url()) |
|---|
Note: See
TracBrowser for help on using the repository browser.