Ignore:
Timestamp:
5 Jul 2021, 15:42:14 (3 years ago)
Author:
Henrik Bettermann
Message:

Extend IPayer adapter.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/payment.py

    r16225 r16526  
    9494
    9595    @property
     96    def payer(self):
     97        "The payer object"
     98        return self.context.__parent__
     99
     100    @property
    96101    def display_fullname(self):
    97102        "Name of  payer"
     
    140145        return 'N/A'
    141146
     147    def doAfterPayment(self):
     148        "Do after payment was made."
     149        return self.context.__parent__.doAfterApplicantPayment()
     150
    142151# Applicant online payments must be importable. So we might need a factory.
    143152class ApplicantOnlinePaymentFactory(grok.GlobalUtility):
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py

    r16243 r16526  
    10181018        self.assertEqual(payment.amount_auth,200.0)
    10191019        # Applicant is payer of the payment ticket.
     1020        self.assertEqual(IPayer(payment).payer, self.applicant)
    10201021        self.assertEqual(
    10211022            IPayer(payment).display_fullname, 'John Anthony Tester')
Note: See TracChangeset for help on using the changeset viewer.