Ignore:
Timestamp:
11 May 2012, 15:46:29 (13 years ago)
Author:
Henrik Bettermann
Message:

Implement payment approval in waeup.uniben.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/students
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py

    r8263 r8421  
    2626    StudentPersonalDisplayFormPage,
    2727    StudentClearanceManageFormPage, StudentClearanceEditFormPage,
    28     StudentClearanceDisplayFormPage, OnlinePaymentCallbackPage,
     28    StudentClearanceDisplayFormPage, OnlinePaymentFakeApprovePage,
    2929    ExportPDFClearanceSlipPage, StudentBaseManageFormPage,
    3030    StudentBaseEditFormPage, StudentPersonalEditFormPage,
     
    3232    OnlinePaymentBreadcrumb, ExportPDFPaymentSlipPage)
    3333from waeup.kofa.students.viewlets import (
    34     RequestCallbackActionButton, PaymentReceiptActionButton)
     34    PaymentReceiptActionButton)
    3535from waeup.uniben.students.interfaces import (
    3636    ICustomStudentBase, ICustomStudent, ICustomStudentPersonal,
     
    184184        return payment
    185185
     186class CustomOnlinePaymentFakeApprovePage(OnlinePaymentFakeApprovePage):
     187    """ Disable payment approval view for students.
     188
     189    This view is used for browser tests only and
     190    has to be neutralized here!
     191    """
     192
     193    grok.name('fake_approve')
     194    grok.require('waeup.managePortal')
     195
     196    def update(self):
     197        return
     198
    186199class CustomExportPDFPaymentSlipPage(ExportPDFPaymentSlipPage):
    187200    """Deliver a PDF slip of the context.
  • main/waeup.uniben/trunk/src/waeup/uniben/students/payments.py

    r8247 r8421  
    2323from zope.interface import implementedBy
    2424from waeup.kofa.students.interfaces import IStudentNavigation
    25 from waeup.kofa.payments import PaymentsContainer, OnlinePayment
     25from waeup.kofa.students.payments import StudentOnlinePayment
    2626from waeup.kofa.utils.helpers import attrs_to_fields
    2727from waeup.uniben.students.interfaces import ICustomStudentOnlinePayment
    2828
    29 class CustomStudentOnlinePayment(OnlinePayment):
    30     """This is an online payment.
     29class CustomStudentOnlinePayment(StudentOnlinePayment):
     30    """This is a custom online payment for students.
     31
     32    Since this class inherits from StudentOnlinePayment, it automatically
     33    implements the interfaces of the parent class which means
     34    all viewlets and views meant for StudentOnlinePayment
     35    can also be accessed in the customized system.
    3136    """
    3237    grok.implements(ICustomStudentOnlinePayment, IStudentNavigation)
  • main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py

    r8413 r8421  
    124124                # has paid for.
    125125                details['p_session'], details['p_level'] = self.getReturningData(student)
    126         if details['amount'] == 0.0:
     126        if details['amount'] in (0.0, None):
    127127            details['error'] = _(u'Amount could not be determined.')
    128128        return details
Note: See TracChangeset for help on using the changeset viewer.