diff --git a/apps/billing/services/processor_service.py b/apps/billing/services/processor_service.py index 9360b78..b0719ff 100644 --- a/apps/billing/services/processor_service.py +++ b/apps/billing/services/processor_service.py @@ -47,7 +47,7 @@ def send_transaction_to_processor(self) -> dict: response = requests.post( url=self.__processor_url, data=self.data, - headers={"Content-type": "application/xml; charset=utf-8", "SOAPAction": "''"}, + headers={"Content-type": "text/xml; charset=UTF-8", "SOAPAction": "''"}, auth=( self.__user_processor_auth, self.__user_processor_password, diff --git a/apps/billing/tests/test_sagex3_processor_service.py b/apps/billing/tests/test_sagex3_processor_service.py index f9791d3..53397c0 100644 --- a/apps/billing/tests/test_sagex3_processor_service.py +++ b/apps/billing/tests/test_sagex3_processor_service.py @@ -44,7 +44,7 @@ def test_send_transaction_to_processor_header_content_type(self, mock_data, mock SageX3Processor(None).send_transaction_to_processor() _, kwargs = mock_post.call_args called_headers = kwargs["headers"] - self.assertEqual("application/xml; charset=utf-8", called_headers["Content-type"]) + self.assertEqual("text/xml; charset=UTF-8", called_headers["Content-type"]) @mock.patch("requests.post", return_value=MockResponse(data="", status_code=200)) @mock.patch("apps.billing.services.processor_service.SageX3Processor.data", side_effect=lambda: {"some": "thing"})