Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: receipt link method #19

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nau_extensions/financial_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def get_receipt_link(order):
token = _get_financial_manager_setting(site, "token")
try:
logger.info("Get receipt link for transaction id [%s]", transaction_id)
response = requests.post(
response = requests.get(
receipt_link_url,
headers={"Authorization": token},
timeout=10,
Expand Down
4 changes: 2 additions & 2 deletions nau_extensions/tests/test_financial_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def test_send_to_financial_manager_other_error(self):
},
},
)
@mock.patch.object(requests, "post", return_value=MockResponse(
@mock.patch.object(requests, "get", return_value=MockResponse(
json_data="https://example.com/somereceipt.pdf",
status_code=200,
))
Expand Down Expand Up @@ -616,7 +616,7 @@ def test_get_receipt_link_found(self, mock_fm_receipt_link):
},
},
)
@mock.patch.object(requests, "post", return_value=MockResponse(
@mock.patch.object(requests, "get", return_value=MockResponse(
status_code=404,
))
def test_get_receipt_link_not_found(self, mock_fm_receipt_link):
Expand Down
Loading