Index: /main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/utils.py
===================================================================
--- /main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/utils.py	(revision 17037)
+++ /main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/utils.py	(revision 17038)
@@ -54,2 +54,35 @@
         'tsc': ['Transcript', 'TRF'],
         }
+
+    def setPaymentDetails(self, container, payment, applicant):
+        """Set the payment data of an applicant.
+        In contrast to its `StudentsUtils` counterpart, the payment ticket
+        must exist and is an argument of this method.
+        """
+        timestamp = ("%d" % int(time()*10000))[1:]
+        payment.p_id = "p%s" % timestamp
+        payment.p_item = container.title
+        if container.year:
+            payment.p_session = container.year
+        else:
+            payment.p_session = datetime.now().year
+        payment.amount_auth = 0.0
+        if applicant.special:
+            if applicant.special_application:
+                try:
+                    session_config = grok.getSite()['configuration'][
+                        str(payment.p_session)]
+                except KeyError:
+                    return _(u'Session configuration object is not available.')   
+                fee_name = applicant.special_application + '_fee'
+                payment.amount_auth = getattr(session_config, fee_name, None)
+                payment.p_category = applicant.special_application
+            if payment.amount_auth in (0.0, None):
+                return _('Amount could not be determined. Have you saved the form?')
+            return
+        payment.p_category = 'application'
+        container_fee = container.application_fee
+        if not container_fee:
+            return _('Amount could not be determined.')
+        payment.amount_auth = container_fee
+        return        
