Index: WAeUP_SRP/trunk/skins/waeup_student/request_transfer.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/request_transfer.py	(revision 1319)
+++ WAeUP_SRP/trunk/skins/waeup_student/request_transfer.py	(revision 1319)
@@ -0,0 +1,82 @@
+## Script (Python) "pay_by_sc"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+pay online
+"""
+import logging
+from urllib import urlencode
+logger = logging.getLogger('EPayment.')
+import DateTime
+lt = context.portal_layouts
+request = context.REQUEST
+students = context.portal_url.getPortalObject().campus.students
+
+student_id = context.getStudentId()
+if student_id is None:
+    return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
+
+student = getattr(students,student_id)
+sbrain = context.students_catalog(id=student_id)[0]
+
+validate = request.has_key("cpsdocument_create_button")
+res,psm,ds = lt.renderLayout(layout_id= 'student_transfer',
+                      schema_id= 'epayment',
+                      context=context,
+                      mapping=validate and request,
+                      ob={},
+                      layout_mode="create",
+                      formaction = "request_transfer",
+                      button = 'Start'
+                      )
+if psm == 'invalid':
+    psm = 'Please correct your errors!'
+    return context.request_transfer_form(rendered = res,
+                                 psm = psm,
+                                 mode = 'edit',
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.request_transfer_form(rendered = res,
+                                 psm = None,
+                                 mode = 'edit',
+                                 ds = ds,
+                                 )
+elif psm == 'valid':
+    pass
+if "payments" not in student.objectIds():
+    student.invokeFactory('PaymentsFolder','payments')
+    payments = getattr(student,'payments')
+    d = {}
+    d['Title'] = 'Payments'
+    payments.getContent().edit(mapping=d)
+    wftool.doActionFor(payments,'open')
+else:
+    payments = getattr(student,'payments')
+#from Products.zdb import set_trace; set_trace()
+info = {}
+order_id = ds.get('pin_n')
+p_id = "p%s" % order_id
+now = DateTime.DateTime()
+info['date'] = now
+info['amount'] = "n/a"
+pin = info['order_id'] = ds.get('pin')
+info['type_code'] = "%s" % pin
+info['type_description'] = 'School Fee SC %s' % pin
+payments.invokeFactory('Payment', p_id)
+payment = getattr(payments,p_id)
+wftool = context.portal_workflow
+wftool.doActionFor(payment,'open')
+payment.getContent().edit(mapping=info)
+wftool.doActionFor(payment,'close')
+wftool.doActionFor(student,'pay_school_fee')
+url = "%s/payments" % (student.absolute_url())
+request.RESPONSE.redirect(url)
+
Index: WAeUP_SRP/trunk/skins/waeup_student/request_transfer_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/request_transfer_form.pt	(revision 1319)
+++ WAeUP_SRP/trunk/skins/waeup_student/request_transfer_form.pt	(revision 1319)
@@ -0,0 +1,23 @@
+<tal:block define="rendered_main options/rendered;
+           portal_status_message options/psm;
+           data_storage options/ds;
+           edition python:1;"
+           >
+  <metal:block define-macro="edit_form">
+    <metal:block use-macro="here/content_lib_master/macros/master">
+      <metal:block fill-slot="header"
+                   tal:define="creation creation|nothing;
+                   edition edition|nothing;
+                   metadata metadata|nothing"
+                   >
+      </metal:block>
+      <metal:block fill-slot="main">
+        <h3>Request a Transfer!</h3>
+        <br />
+        <div tal:replace="structure rendered_main" />
+      </metal:block>
+      <metal:block fill-slot="sub">
+      </metal:block>
+    </metal:block>
+  </metal:block>
+</tal:block>
