Index: /main/waeup.kofa/trunk/CHANGES.txt
===================================================================
--- /main/waeup.kofa/trunk/CHANGES.txt	(revision 16430)
+++ /main/waeup.kofa/trunk/CHANGES.txt	(revision 16431)
@@ -4,4 +4,8 @@
 1.6.1.dev0 (unreleased)
 =======================
+
+* Add payment option (`p_option`) field to payment tickets and add
+  select box on online payment add form pages. Disable this feature
+  in the base package.
 
 * Allow lecturers to export all course tickets, not only
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 16430)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 16431)
@@ -819,4 +819,6 @@
             self.redirect(self.url(self.context))
             return
+        if getattr(self.context, 'p_option', None):
+            payment.p_option = self.context.p_option
         self.context[payment.p_id] = payment
         self.context.writeLogMessage(self, 'added: %s' % payment.p_id)
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py	(revision 16430)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py	(revision 16431)
@@ -162,5 +162,5 @@
         IApplicantOnlinePayment,
         exclude_attribs=False,
-        omit=['display_item']))) + (
+        omit=['display_item', 'p_option']))) + (
               'applicant_id',
               'reg_number',
Index: /main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py	(revision 16430)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py	(revision 16431)
@@ -38,4 +38,11 @@
     DICT_NAME = 'PAYMENT_CATEGORIES'
 
+class PaymentOptionSource(ContextualDictSourceFactoryBase):
+    """A payment option source delivers all options of a payment.
+
+    """
+    #: name of dict to deliver from kofa utils.
+    DICT_NAME = 'PAYMENT_OPTIONS'
+
 class CombiPaymentCategorySource(ContextualDictSourceFactoryBase):
     """A payment category source delivers all categories of payments.
@@ -61,4 +68,10 @@
         source = PaymentCategorySource(),
         required = True,
+        )
+
+    p_option = schema.Choice(
+        title = _(u'Payment Option'),
+        source = PaymentOptionSource(),
+        required = False,
         )
 
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 16430)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 16431)
@@ -2241,8 +2241,16 @@
         return sorted(categories.items(), key=lambda value: value[1])
 
+    @property
+    def selectable_payment_options(self):
+        student = self.context.__parent__
+        options = getUtility(
+            IKofaUtils).selectable_payment_options(student)
+        return sorted(options.items(), key=lambda value: value[1])
+
     @action(_('Create ticket'), style='primary')
     def createTicket(self, **data):
         form = self.request.form
         p_category = form.get('form.p_category', None)
+        p_option = form.get('form.p_option', None)
         p_combi = form.get('form.p_combi', [])
         if isinstance(form.get('form.p_combi', None), unicode):
@@ -2272,4 +2280,6 @@
         if p_category == 'transfer':
             payment.p_item = form['new_programme']
+        if p_option:
+            payment.p_option = p_option
         self.context[payment.p_id] = payment
         self.flash(_('Payment ticket created.'))
@@ -2287,4 +2297,5 @@
     grok.context(IStudentPaymentsContainer)
     grok.name('addpp')
+    grok.template('previouspaymentaddform')
     grok.require('waeup.payStudent')
     form_fields = grok.AutoFields(IStudentPreviousPayment)
@@ -2299,7 +2310,15 @@
         return
 
+    @property
+    def selectable_payment_options(self):
+        student = self.context.__parent__
+        options = getUtility(
+            IKofaUtils).selectable_payment_options(student)
+        return sorted(options.items(), key=lambda value: value[1])
+
     @action(_('Create ticket'), style='primary')
     def createTicket(self, **data):
         p_category = data['p_category']
+        p_option = data.get('p_option', None)
         previous_session = data.get('p_session', None)
         previous_level = data.get('p_level', None)
@@ -2311,4 +2330,6 @@
             self.flash(error, type="danger")
             return
+        if p_option:
+            payment.p_option = p_option
         self.context[payment.p_id] = payment
         self.flash(_('Payment ticket created.'))
@@ -2327,4 +2348,5 @@
     grok.context(IStudentPaymentsContainer)
     grok.name('addbp')
+    grok.template('previouspaymentaddform')
     grok.require('waeup.manageStudent')
     form_fields = grok.AutoFields(IStudentBalancePayment)
@@ -2332,7 +2354,15 @@
     pnav = 4
 
+    @property
+    def selectable_payment_options(self):
+        student = self.context.__parent__
+        options = getUtility(
+            IKofaUtils).selectable_payment_options(student)
+        return sorted(options.items(), key=lambda value: value[1])
+
     @action(_('Create ticket'), style='primary')
     def createTicket(self, **data):
         p_category = data['p_category']
+        p_option = data.get('p_option', None)
         balance_session = data.get('balance_session', None)
         balance_level = data.get('balance_level', None)
@@ -2346,4 +2376,6 @@
             self.flash(error, type="danger")
             return
+        if p_option:
+            payment.p_option = p_option
         self.context[payment.p_id] = payment
         self.flash(_('Payment ticket created.'))
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/onlinepaymentaddform.pt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/onlinepaymentaddform.pt	(revision 16430)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/onlinepaymentaddform.pt	(revision 16431)
@@ -14,4 +14,18 @@
                     tal:attributes="value python:item[0]">
               <span tal:replace="python:item[1]">FEE CATEGORY</span>
+            </option>
+          </select>
+        </td>
+      </tr>
+      <tr tal:condition="view/selectable_payment_options">
+        <td class="fieldname">
+          Payment Option:
+        </td>
+        <td>
+          <select id="form.p_option" name="form.p_option" size="1"
+                  class="form-control half" onclick="further()">
+            <option tal:repeat="item view/selectable_payment_options"
+                    tal:attributes="value python:item[0]">
+              <span tal:replace="python:item[1]">PAYMENT OPTION</span>
             </option>
           </select>
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/previouspaymentaddform.pt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/previouspaymentaddform.pt	(revision 16431)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/previouspaymentaddform.pt	(revision 16431)
@@ -0,0 +1,30 @@
+<form action="." tal:attributes="action request/URL" method="post"
+      enctype="multipart/form-data">
+
+  <table class="form-table">
+    <tbody>
+      <tal:widgets content="structure provider:widgets" />
+      <tr tal:condition="view/selectable_payment_options">
+        <td class="fieldname">
+          Payment Option:
+        </td>
+        <td>
+          <select id="form.p_option" name="form.p_option" size="1"
+                  class="form-control half" onclick="further()">
+            <option tal:repeat="item view/selectable_payment_options"
+                    tal:attributes="value python:item[0]">
+              <span tal:replace="python:item[1]">PAYMENT OPTION</span>
+            </option>
+          </select>
+        </td>
+      </tr>
+      <tal:files content="structure provider:files" />
+    </tbody>
+  </table>
+  <br />
+  <div tal:condition="view/availableActions">
+    <input tal:repeat="action view/actions"
+           tal:replace="structure action/render"
+           />
+  </div>
+</form>
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/export.py	(revision 16430)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/export.py	(revision 16431)
@@ -491,5 +491,5 @@
         sorted(iface_names(
             IStudentOnlinePayment, exclude_attribs=False,
-            omit=['display_item', 'certificate', 'student']))) + (
+            omit=['display_item', 'certificate', 'student', 'p_option']))) + (
             'student_id','state','current_session')
     title = _(u'Student Payments (Data Backup)')
@@ -520,5 +520,5 @@
         sorted(iface_names(
             IStudentOnlinePayment, exclude_attribs=False,
-            omit=['display_item', 'certificate', 'student', 'ac']))) + (
+            omit=['display_item', 'certificate', 'student', 'ac', 'p_option']))) + (
             'student_id','faccode', 'depcode', 'state','current_session')
     title = _(u'Student Payments (Sorted Data)')
@@ -640,5 +640,5 @@
         sorted(iface_names(
             IStudentOnlinePayment, exclude_attribs=False,
-            omit=['display_item', 'certificate', 'student']))) + (
+            omit=['display_item', 'certificate', 'student', 'p_option']))) + (
             'student_id','matric_number','reg_number',
             'firstname', 'middlename', 'lastname','sex',
Index: /main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py	(revision 16430)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py	(revision 16431)
@@ -188,6 +188,15 @@
         }
 
+    #: If PAYMENT_OPTIONS is empty, payment option fields won't show up.
+    PAYMENT_OPTIONS = {
+        #'credit_card': 'Credit Card',
+        #'debit_card': 'Debit Card',
+        }
+
     def selectable_payment_categories(self, student):
         return self.PAYMENT_CATEGORIES
+
+    def selectable_payment_options(self, student):
+        return self.PAYMENT_OPTIONS
 
     PREVIOUS_PAYMENT_CATEGORIES = deepcopy(PAYMENT_CATEGORIES)
