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
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
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
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
def getDirectDebitAccounts(self): """ """ pm = IPaymentManagement(self.context) return pm.getPaymentMethods(IDirectDebit)