Index: WAeUP_SRP/trunk/skins/waeup_epayment/epayment_cb.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_epayment/epayment_cb.py	(revision 1294)
+++ WAeUP_SRP/trunk/skins/waeup_epayment/epayment_cb.py	(revision 1303)
@@ -18,5 +18,5 @@
 request = context.REQUEST
 students = context.portal_url.getPortalObject().campus.students
-
+wftool = context.portal_workflow
 student_id = context.getStudentId()
 if student_id is None:
@@ -41,3 +41,6 @@
     pd[pdk] = request.get(rc)
 context.getContent().edit(mapping=pd)
+wftool.doActionFor(student,'pay_school_fee')
+wftool.doActionFor(context,'close')
+
 return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url()) 
Index: WAeUP_SRP/trunk/skins/waeup_epayment/pay_by_sc.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_epayment/pay_by_sc.py	(revision 1294)
+++ WAeUP_SRP/trunk/skins/waeup_epayment/pay_by_sc.py	(revision 1303)
@@ -30,5 +30,5 @@
                                      id = sbrain.course)
 if not res:
-    logger.info('"%s","certificate not found", "%s"' % (student_id,course))
+    logger.info('"%s","certificate not found", "%s"' % (student_id,sbrain.course))
     prefix = ""
 else:
Index: WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py	(revision 1294)
+++ WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py	(revision 1303)
@@ -17,4 +17,5 @@
 import DateTime
 request = context.REQUEST
+wftool = context.portal_workflow
 students = context.portal_url.getPortalObject().campus.students
 
@@ -64,8 +65,11 @@
 payments.invokeFactory('Payment', p_id)
 payment = getattr(payments,p_id)
+wftool.doActionFor(payment,'open')
 d = {}
 d.update(info)
 #from Products.zdb import set_trace;set_trace()
 payment.getContent().edit(mapping=d)
+wftool.doActionFor(payment,'close')
+wftool.doActionFor(student,'pay_school_fee')
 info['callback_url'] = "%s/payments/%s/epayment_cb" % (student.absolute_url(),p_id)
 if context.portal_url().find('uniben-demo.waeup.org') >-1 or\
@@ -93,3 +97,2 @@
 url = info['action'] + "?" + urlencode(args)
 request.RESPONSE.redirect(url)
-
