Changeset 15554


Ignore:
Timestamp:
19 Aug 2019, 19:34:08 (5 years ago)
Author:
Henrik Bettermann
Message:

doAfterApplicantPaymentApproval and doAfterApplicantPayment are no longer necessary because of changes in base package.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/applicants/payment.py

    r15386 r15554  
    4646        return
    4747
    48     def doAfterApplicantPaymentApproval(self):
    49         """Process applicant after payment was approved.
    50         """
    51         if not (self.__parent__.special and self.__parent__.state == PAID) \
    52             and self.p_category != 'admission_checking':
    53             wf_info = IWorkflowInfo(self.__parent__)
    54             try:
    55                 wf_info.fireTransition('approve')
    56             except InvalidTransitionError:
    57                 msg = log = 'Error: %s' % sys.exc_info()[1]
    58                 return 'danger', msg, log
    59         log = 'approved: %s' % self.p_id
    60         msg = _('Payment approved')
    61         flashtype = 'success'
    62         return flashtype, msg, log
    63 
    64     def doAfterApplicantPayment(self):
    65         """Process applicant after payment was made.
    66         """
    67         if not (self.__parent__.special and self.__parent__.state == PAID) \
    68             and self.p_category != 'admission_checking':
    69             wf_info = IWorkflowInfo(self.__parent__)
    70             try:
    71                 wf_info.fireTransition('pay')
    72             except InvalidTransitionError:
    73                 msg = log = 'Error: %s' % sys.exc_info()[1]
    74                 return 'danger', msg, log
    75         log = 'successful payment: %s' % self.p_id
    76         msg = _('Successful payment')
    77         flashtype = 'success'
    78         return flashtype, msg, log
    79 
    8048CustomApplicantOnlinePayment = attrs_to_fields(
    8149    CustomApplicantOnlinePayment, omit=['display_item'])
Note: See TracChangeset for help on using the changeset viewer.