diff --git a/queue_services/entity-emailer/src/entity_emailer/email_processors/continuation_in_notification.py b/queue_services/entity-emailer/src/entity_emailer/email_processors/continuation_in_notification.py index 78ae10a8b2..f49eecd6c2 100644 --- a/queue_services/entity-emailer/src/entity_emailer/email_processors/continuation_in_notification.py +++ b/queue_services/entity-emailer/src/entity_emailer/email_processors/continuation_in_notification.py @@ -69,7 +69,7 @@ def _get_pdfs( # add receipt corp_name = filing.filing_json['filing']['continuationIn']['nameRequest'].get('legalName', 'Numbered Company') - # Debugging logger for #24361, will remove later + # Debugging logger for #24361, will have another PR before closing the ticket to remove it current_app.logger.debug( f'\U0001F4D2 - Business: {business}\n' f"""\U0001F4D2 - Payload to get receipt: json: @@ -94,7 +94,7 @@ def _get_pdfs( headers=headers ) if receipt.status_code != HTTPStatus.CREATED: - # Debugging logger for #24361, will remove later + # Debugging logger for #24361, will have another PR before closing the ticket to remove it current_app.logger.debug(f'\U0001F4D2 - Error getting receipt, when PAID Response: {receipt.text}') # debugging logger end logger.error('Failed to get receipt pdf for filing: %s', filing.id) @@ -126,20 +126,6 @@ def _get_pdfs( attach_order += 1 elif status == Filing.Status.COMPLETED.value: - # add filing pdf - filing_pdf_type = 'continuationIn' - filing_pdf_encoded = get_filing_document(business['identifier'], filing.id, filing_pdf_type, token) - if filing_pdf_encoded: - pdfs.append( - { - 'fileName': 'Continuation Application.pdf', - 'fileBytes': filing_pdf_encoded.decode('utf-8'), - 'fileUrl': '', - 'attachOrder': str(attach_order) - } - ) - attach_order += 1 - # add certificate of continuation certificate_pdf_type = 'certificateOfContinuation' certificate_encoded = get_filing_document(business['identifier'], filing.id, certificate_pdf_type, token) @@ -168,37 +154,6 @@ def _get_pdfs( ) attach_order += 1 - # add receipt - corp_name = business.get('legalName') - - receipt = requests.post( - f'{current_app.config.get("PAY_API_URL")}/{filing.payment_token}/receipts', - json={ - 'corpName': corp_name, - 'filingDateTime': filing_date_time, - 'effectiveDateTime': effective_date if effective_date != filing_date_time else '', - 'filingIdentifier': str(filing.id), - 'businessNumber': business.get('taxId', '') - }, - headers=headers - ) - if receipt.status_code != HTTPStatus.CREATED: - # Debugging logger for #24361, will remove later - current_app.logger.debug(f'\U0001F4D2 - Error getting receipt, when COMPLETED Response: {receipt.text}') - # debugging logger end - logger.error('Failed to get receipt pdf for filing: %s', filing.id) - else: - receipt_encoded = base64.b64encode(receipt.content) - pdfs.append( - { - 'fileName': 'Receipt.pdf', - 'fileBytes': receipt_encoded.decode('utf-8'), - 'fileUrl': '', - 'attachOrder': str(attach_order) - } - ) - attach_order += 1 - return pdfs diff --git a/queue_services/entity-emailer/src/entity_emailer/email_templates/CONT-IN-COMPLETED.html b/queue_services/entity-emailer/src/entity_emailer/email_templates/CONT-IN-COMPLETED.html index ae49cb4787..9016f415b1 100644 --- a/queue_services/entity-emailer/src/entity_emailer/email_templates/CONT-IN-COMPLETED.html +++ b/queue_services/entity-emailer/src/entity_emailer/email_templates/CONT-IN-COMPLETED.html @@ -33,10 +33,8 @@ {% else %} {% endif %} diff --git a/queue_services/entity-emailer/src/entity_emailer/worker.py b/queue_services/entity-emailer/src/entity_emailer/worker.py index 089411b6f5..2108996a66 100644 --- a/queue_services/entity-emailer/src/entity_emailer/worker.py +++ b/queue_services/entity-emailer/src/entity_emailer/worker.py @@ -123,7 +123,7 @@ def process_email(email_msg: dict, flask_app: Flask): # pylint: disable=too-man """Process the email contained in the submission.""" if not flask_app: raise QueueException('Flask App not available.') - # Debugging logger for #24361, will remove later + # Debugging logger for #24361, will have another PR before closing the ticket to remove it flask_app.logger.debug(f'\U0001F4D2 email_msg: {email_msg}') # debugging logger end with flask_app.app_context():