Index: /main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py	(revision 13814)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py	(revision 13815)
@@ -69,2 +69,37 @@
                 fac_stats[faculty.__name__] += 1
         return state_stats, fac_stats
+
+
+    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:]
+        session = str(container.year)
+        try:
+            session_config = grok.getSite()['configuration'][session]
+        except KeyError:
+            return _(u'Session configuration object is not available.')
+        payment.p_id = "p%s" % timestamp
+        payment.p_item = container.title
+        payment.p_session = container.year
+        payment.amount_auth = 0.0
+        if applicant.special:
+            if applicant.special_application:
+                fee_name = applicant.special_application + '_fee'
+                payment.amount_auth = getattr(session_config, fee_name, None)
+                if payment.amount_auth in (0.0, None):
+                    return _('Amount could not be determined.')
+                payment.p_category = applicant.special_application
+            return
+        payment.p_category = 'application'
+        container_fee = container.application_fee
+        if container_fee:
+            payment.amount_auth = container_fee
+            return
+        payment.amount_auth = session_config.application_fee
+        if payment.amount_auth in (0.0, None):
+            return _('Amount could not be determined.')
+        return
+
