예제 #1
0
파일: customer.py 프로젝트: viona/Easyshop
    def _getPaymentMethodsAsDL(self):
        """Returns all payment methods as DisplayList.
        """
        dl = DisplayList()

        pm = IPaymentManagement(IShopManagement(self).getShop())
        for payment_method in pm.getPaymentMethods():
            dl.add(payment_method.getId(), payment_method.Title())

        return dl
예제 #2
0
    def _getPaymentMethodsAsDL(self):
        """Returns all payment methods as DisplayList.
        """
        dl = DisplayList()

        pm = IPaymentManagement(IShopManagement(self).getShop())
        for payment_method in pm.getPaymentMethods():
            dl.add(payment_method.getId(), payment_method.Title())

        return dl
예제 #3
0
 def getBankInformation(self):
     """
     """
     
     customer = self._getCustomer()
     if customer is None:
         return []
     
     result = []
     pm = IPaymentManagement(customer)
     for payment_method in pm.getPaymentMethods(IDirectDebit):
         result.append({
             "url"            : payment_method.absolute_url(),
             "account_number" : payment_method.getAccountNumber(),
             "bic"            : payment_method.getBankIdentificationCode(),
             "name"           : payment_method.getName(),
             "bank_name"      : payment_method.getBankName(),
         })
         
     return result
예제 #4
0
    def getBankInformation(self):
        """
        """

        customer = self._getCustomer()
        if customer is None:
            return []

        result = []
        pm = IPaymentManagement(customer)
        for payment_method in pm.getPaymentMethods(IDirectDebit):
            result.append({
                "url": payment_method.absolute_url(),
                "account_number": payment_method.getAccountNumber(),
                "bic": payment_method.getBankIdentificationCode(),
                "name": payment_method.getName(),
                "bank_name": payment_method.getBankName(),
            })

        return result
예제 #5
0
 def getDirectDebitAccounts(self):
     """
     """
     pm = IPaymentManagement(self.context)
     return pm.getPaymentMethods(IDirectDebit)