diff --git a/pay-api/src/pay_api/services/pad_service.py b/pay-api/src/pay_api/services/pad_service.py index a09ce5cf9..e45ea0ccb 100644 --- a/pay-api/src/pay_api/services/pad_service.py +++ b/pay-api/src/pay_api/services/pad_service.py @@ -102,7 +102,7 @@ def update_account(self, name: str, cfs_account: CfsAccountModel, payment_info: def create_invoice(self, payment_account: PaymentAccount, line_items: [PaymentLineItem], invoice: Invoice, **kwargs) -> InvoiceReference: # pylint: disable=unused-argument """Return a static invoice number for direct pay.""" - if payment_account.cfs_account and payment_account.cfs_account.status == CfsAccountStatus.FREEZE.value: + if payment_account.cfs_account_status == CfsAccountStatus.FREEZE.value: # Note NSF (Account Unlocking) is paid using DIRECT_PAY - CC flow, not PAD. current_app.logger.info(f'Account {payment_account.id} is frozen, rejecting invoice creation') raise BusinessException(Error.PAD_CURRENTLY_NSF)