Index: /main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py	(revision 8258)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py	(revision 8259)
@@ -19,5 +19,8 @@
 """
 import grok
+from zope.component import getUtility
+from zope.i18n import translate
 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget
+from waeup.kofa.students.interfaces import IStudentsUtils
 from waeup.kofa.applicants.interfaces import (
     IApplicantRegisterUpdate, IApplicant, IApplicantEdit)
@@ -27,6 +30,8 @@
     ApplicantRegistrationPage, ApplicantAddFormPage,
     OnlinePaymentDisplayFormPage, AcceptanceFeePaymentAddPage,
-    OnlinePaymentBreadcrumb)
-from waeup.kofa.applicants.viewlets import RequestCallbackActionButton
+    OnlinePaymentBreadcrumb, ExportPDFPaymentSlipPage,
+    ApplicantBaseDisplayFormPage)
+from waeup.kofa.applicants.viewlets import (
+    RequestCallbackActionButton, PaymentReceiptActionButton)
 from waeup.kofa.applicants.pdf import PDFApplicationSlip
 from waeup.uniben.applicants.interfaces import (
@@ -36,19 +41,20 @@
 
 #class RequestCallbackActionButton(RequestCallbackActionButton):
-#    """ Do not display the base package callback button in custom pages.
+#    """ Display the base package callback button in custom pages.
 #    """
-#    @property
-#    def target_url(self):
-#        return ''
+#    grok.context(ICustomApplicantOnlinePayment)
 
 #class CustomOnlinePaymentCallbackPage(OnlinePaymentCallbackPage):
-#    """ Neutralize callback simulation view
+#    """ Activate callback simulation view
 #    """
-#    def update(self):
-#        return
+#    grok.context(ICustomApplicantOnlinePayment)
 
 class CustomOnlinePaymentBreadcrumb(OnlinePaymentBreadcrumb):
     """A breadcrumb for payments.
     """
+    grok.context(ICustomApplicantOnlinePayment)
+
+class PaymentReceiptActionButton(PaymentReceiptActionButton):
+    grok.order(4)
     grok.context(ICustomApplicantOnlinePayment)
 
@@ -144,2 +150,21 @@
         payment.surcharge_3 = session_config.surcharge_3
         return payment
+
+class CustomExportPDFPaymentSlipPage(ExportPDFPaymentSlipPage):
+    """Deliver a PDF slip of the context.
+    """
+    grok.context(ICustomApplicantOnlinePayment)
+    form_fields = grok.AutoFields(ICustomApplicantOnlinePayment)
+    form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
+    form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
+
+    @property
+    def note(self):
+        tcode = self.context.p_id
+        tcode = tcode[len(tcode)-8:len(tcode)]
+        amount = self.context.amount_auth
+        note = translate(_(
+            u"""<br /><br /><br />
+The tranzaction code for eTranzact payments is <strong>${a}</strong>.""",
+            mapping = {'a':tcode}))
+        return note
Index: /main/waeup.uniben/trunk/src/waeup/uniben/etranzact/browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/etranzact/browser.py	(revision 8258)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/etranzact/browser.py	(revision 8259)
@@ -29,4 +29,5 @@
 from waeup.uniben.students.interfaces import ICustomStudentOnlinePayment
 from waeup.uniben.applicants.interfaces import ICustomApplicantOnlinePayment
+
 
 TERMINAL_ID = '0500000003'
@@ -101,4 +102,5 @@
 class EtranzactEnterPinActionButtonApplicant(RCABApplicant):
     grok.context(ICustomApplicantOnlinePayment)
+    grok.order(3)
     icon = 'actionicon_call.png'
     text = _('Query eTranzact History')
@@ -107,4 +109,5 @@
 class EtranzactEnterPinActionButtonStudent(RCABStudent):
     grok.context(ICustomStudentOnlinePayment)
+    grok.order(3)
     icon = 'actionicon_call.png'
     text = _('Query eTranzact History')
Index: /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py	(revision 8258)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py	(revision 8259)
@@ -28,4 +28,5 @@
 from waeup.kofa.students.viewlets import RequestCallbackActionButton as RCABStudent
 from waeup.kofa.applicants.viewlets import RequestCallbackActionButton as RCABApplicant
+from waeup.kofa.payments.interfaces import payment_categories
 from waeup.uniben.students.utils import actions_after_student_payment
 from waeup.uniben.applicants.utils import actions_after_applicant_payment
@@ -34,11 +35,19 @@
 #    Interswitch test account data:
 #
-#    Card Number: 6274807700000007
-#    Expiry Date: July 2012
-#    PIN: 0000
-
-#    Card Number: 6278050000000007
-#    Expiry Date: July 2012
-#    PIN: 0000
+#   Card Number: 6274807700000007
+#   Expiry Date: July 2012
+#   PIN: 0000
+
+#   Card Number: 6278050000000007
+#   Expiry Date: July 2012
+#   PIN: 0000
+#
+#   PAN,EXPIRY,PIN,CVV2
+#   5060990330000003386,1304,0000,543
+#   5060990330000003394,1304,0000,865
+#   5060990330000003402,1304,0000,012
+#   5060990330000003410,1304,0000,737
+#   5060990330000003428,1304,0000,310
+#   5060990330000003436,1304,0000,173
 
 PRODUCT_ID = '57'
@@ -160,5 +169,5 @@
 
 class InterswitchActionButtonStudent(RCABStudent):
-    grok.order(2)
+    grok.order(1)
     grok.context(ICustomStudentOnlinePayment)
     icon = 'actionicon_pay.png'
@@ -173,5 +182,5 @@
 
 class InterswitchActionButtonApplicant(RCABApplicant):
-    grok.order(2)
+    grok.order(1)
     grok.context(ICustomApplicantOnlinePayment)
     icon = 'actionicon_pay.png'
@@ -186,33 +195,33 @@
 
 # Deprecated
-class InterswitchRequestCallbackActionButtonStudent(RCABStudent):
-    grok.order(3)
+#class InterswitchRequestCallbackActionButtonStudent(RCABStudent):
+#    grok.order(3)
+#    grok.context(ICustomStudentOnlinePayment)
+#    icon = 'actionicon_call.png'
+#    text = _('Request CollegePAY callback')
+
+#    def target_url(self):
+#        if self.context.p_state == 'paid':
+#            return ''
+#        site_redirect_url = self.view.url(self.view.context, 'isw_callback')
+#        args = {
+#            'transRef':self.context.p_id,
+#            'prodID':PRODUCT_ID,
+#            'redirectURL':site_redirect_url}
+#        return QUERY_URL + '?%s' % urllib.urlencode(args)
+
+# Alternative preferred solution
+class InterswitchRequestWebserviceActionButtonStudent(RCABStudent):
+    grok.order(2)
     grok.context(ICustomStudentOnlinePayment)
     icon = 'actionicon_call.png'
-    text = _('Request CollegePAY callback')
-
-    def target_url(self):
-        if self.context.p_state == 'paid':
-            return ''
-        site_redirect_url = self.view.url(self.view.context, 'isw_callback')
-        args = {
-            'transRef':self.context.p_id,
-            'prodID':PRODUCT_ID,
-            'redirectURL':site_redirect_url}
-        return QUERY_URL + '?%s' % urllib.urlencode(args)
-
-# Alternative preferred solution
-class InterswitchRequestWebserviceActionButtonStudent(RCABStudent):
-    grok.order(4)
-    grok.context(ICustomStudentOnlinePayment)
-    icon = 'actionicon_call.png'
-    text = _('Request CollegePAY webservice')
+    text = _('Request CollegePAY Webservice')
     target = 'request_webservice'
 
 class InterswitchRequestWebserviceActionButtonApplicant(RCABApplicant):
-    grok.order(4)
+    grok.order(2)
     grok.context(ICustomApplicantOnlinePayment)
     icon = 'actionicon_call.png'
-    text = _('Request CollegePAY webservice')
+    text = _('Request CollegePAY Webservice')
     target = 'request_webservice'
 
@@ -252,4 +261,6 @@
         self.amount = (self.context.amount_auth + self.context.surcharge_1 +
             self.context.surcharge_2 + self.context.surcharge_3)
+        self.category = payment_categories.getTermByToken(
+            self.context.p_category).title
         self.amount_100 = 100 * self.amount
         self.local_date_time = str(self.context.creation_date)
@@ -267,12 +278,14 @@
 
     def update(self):
-        if self.context.p_state != 'unpaid':
-            self.flash(_("Payment ticket can't be re-send to CollegePAY."))
-            self.redirect(self.url(self.context, '@@index'))
-            return
+        #if self.context.p_state != 'unpaid':
+        #    self.flash(_("Payment ticket can't be re-send to CollegePAY."))
+        #    self.redirect(self.url(self.context, '@@index'))
+        #    return
         self.applicant = self.context.__parent__
         xmldict = {}
         xmldict['department'] = None
         xmldict['faculty'] = None
+        self.category = payment_categories.getTermByToken(
+            self.context.p_category).title
         self.amount = (self.context.amount_auth + self.context.surcharge_1 +
             self.context.surcharge_2 + self.context.surcharge_3)
Index: /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser_templates/applicant_goto_interswitch.pt
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser_templates/applicant_goto_interswitch.pt	(revision 8258)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser_templates/applicant_goto_interswitch.pt	(revision 8259)
@@ -50,5 +50,5 @@
           Payment Category:</td>
         <td>
-          <span tal:replace="view/context/p_category">PAYMENTCATEGORY</span>
+          <span tal:replace="view/category">PAYMENTCATEGORY</span>
         </td>
       </tr>
@@ -63,12 +63,9 @@
   <input type="hidden" name="local_date_time" tal:attributes="value view/local_date_time" />
   <input type="hidden" name="amount" tal:attributes="value view/amount_100" />
-
   <input type="hidden" name="txn_ref" tal:attributes="value view/context/p_id" />
-  <input type="hidden" name="cust_id_desc" tal:attributes="value view/context/p_item" />
-  <input type="hidden" name="pay_item_name" tal:attributes="value view/context/p_category" />
-
+  <input type="hidden" name="pay_item_name" tal:attributes="value view/context/p_item" />
+  <input type="hidden" name="cust_id_desc" tal:attributes="value view/category" />
   <input type="hidden" name="cust_id" tal:attributes="value view/applicant/applicant_id" />
   <input type="hidden" name="cust_name" tal:attributes="value view/applicant/display_fullname" />
-
 
   <input type="hidden" name="payment_params" value="college_split" />
Index: /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser_templates/student_goto_interswitch.pt
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser_templates/student_goto_interswitch.pt	(revision 8258)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser_templates/student_goto_interswitch.pt	(revision 8259)
@@ -50,5 +50,5 @@
           Payment Category:</td>
         <td>
-          <span tal:replace="view/context/p_category">PAYMENTCATEGORY</span>
+          <span tal:replace="view/category">PAYMENTCATEGORY</span>
         </td>
       </tr>
@@ -63,12 +63,9 @@
   <input type="hidden" name="local_date_time" tal:attributes="value view/local_date_time" />
   <input type="hidden" name="amount" tal:attributes="value view/amount_100" />
-
   <input type="hidden" name="txn_ref" tal:attributes="value view/context/p_id" />
-  <input type="hidden" name="cust_id_desc" tal:attributes="value view/context/p_item" />
-  <input type="hidden" name="pay_item_name" tal:attributes="value view/context/p_category" />
-
+  <input type="hidden" name="pay_item_name" tal:attributes="value view/context/p_item" />
+  <input type="hidden" name="cust_id_desc" tal:attributes="value view/category" />
   <input type="hidden" name="cust_id" tal:attributes="value view/student/student_id" />
   <input type="hidden" name="cust_name" tal:attributes="value view/student/display_fullname" />
-
 
   <input type="hidden" name="payment_params" value="college_split" />
Index: /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 8258)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 8259)
@@ -19,4 +19,5 @@
 from zope.formlib.textwidgets import BytesDisplayWidget
 from zope.component import getUtility
+from zope.i18n import translate
 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget
 from waeup.kofa.interfaces import IExtFileStore
@@ -29,6 +30,7 @@
     StudentBaseEditFormPage, StudentPersonalEditFormPage,
     OnlinePaymentDisplayFormPage, OnlinePaymentAddFormPage,
-    OnlinePaymentBreadcrumb)
-from waeup.kofa.students.viewlets import RequestCallbackActionButton
+    OnlinePaymentBreadcrumb, ExportPDFPaymentSlipPage)
+from waeup.kofa.students.viewlets import (
+    RequestCallbackActionButton, PaymentReceiptActionButton)
 from waeup.uniben.students.interfaces import (
     ICustomStudentBase, ICustomStudent, ICustomStudentPersonal,
@@ -38,4 +40,14 @@
 from waeup.uniben.interfaces import MessageFactory as _
 
+#class RequestCallbackActionButton(RequestCallbackActionButton):
+#    """ Display the base package callback button in custom pages.
+#    """
+#    grok.context(ICustomStudentOnlinePayment)
+
+#class CustomOnlinePaymentCallbackPage(OnlinePaymentCallbackPage):
+#    """ Activate callback simulation view
+#    """
+#    grok.context(ICustomStudentOnlinePayment)
+
 class CustomOnlinePaymentBreadcrumb(OnlinePaymentBreadcrumb):
     """A breadcrumb for payments.
@@ -43,16 +55,7 @@
     grok.context(ICustomStudentOnlinePayment)
 
-class RequestCallbackActionButton(RequestCallbackActionButton):
-    """ Do not display the base package callback button in custom pages.
-    """
-    @property
-    def target_url(self):
-        return ''
-
-class CustomOnlinePaymentCallbackPage(OnlinePaymentCallbackPage):
-    """ Neutralize callback simulation view
-    """
-    def update(self):
-        return
+class PaymentReceiptActionButton(PaymentReceiptActionButton):
+    grok.order(4)
+    grok.context(ICustomStudentOnlinePayment)
 
 class CustomStudentBaseManageFormPage(StudentBaseManageFormPage):
@@ -182,2 +185,21 @@
         payment.surcharge_3 = pay_details['surcharge_3']
         return payment
+
+class CustomExportPDFPaymentSlipPage(ExportPDFPaymentSlipPage):
+    """Deliver a PDF slip of the context.
+    """
+    grok.context(ICustomStudentOnlinePayment)
+    form_fields = grok.AutoFields(ICustomStudentOnlinePayment)
+    form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
+    form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
+
+    @property
+    def note(self):
+        tcode = self.context.p_id
+        tcode = tcode[len(tcode)-8:len(tcode)]
+        amount = self.context.amount_auth
+        note = translate(_(
+            u"""<br /><br /><br />
+The tranzaction code for eTranzact payments is <strong>${a}</strong>.""",
+            mapping = {'a':tcode}))
+        return note
