Index: main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py	(revision 8452)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py	(revision 8453)
@@ -515,4 +515,9 @@
         """
 
+    def doAfterStudentPaymentApproval():
+        """Process student after payment was approved.
+
+        """
+
     def approveStudentPayment():
         """Approve payment and process student.
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py	(revision 8452)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py	(revision 8453)
@@ -89,4 +89,33 @@
         return True, msg, log
 
+    def doAfterStudentPaymentApproval(self):
+        """Process student after payment was approved.
+        """
+        student = self.getStudent()
+        if self.p_category == 'clearance':
+            # Create CLR access code
+            pin, error = create_accesscode(
+                'CLR',0,self.amount_auth,student.student_id)
+            if error:
+                return False, error, error
+            self.ac = pin
+        elif self.p_category == 'schoolfee':
+            # Create SFE access code
+            pin, error = create_accesscode(
+                'SFE',0,self.amount_auth,student.student_id)
+            if error:
+                return False, error, error
+            self.ac = pin
+        elif self.p_category == 'bed_allocation':
+            # Create HOS access code
+            pin, error = create_accesscode(
+                'HOS',0,self.amount_auth,student.student_id)
+            if error:
+                return False, error, error
+            self.ac = pin
+        log = 'payment approved: %s' % self.p_id
+        msg = _('Payment approved')
+        return True, msg, log
+
     def approveStudentPayment(self):
         """Approve payment and process student.
