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

Error when changing currency in Settings #15

Closed
zach-sb opened this issue Nov 10, 2023 · 4 comments
Closed

Error when changing currency in Settings #15

zach-sb opened this issue Nov 10, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@zach-sb
Copy link

zach-sb commented Nov 10, 2023

When attempting to change currency to update the exchange rates I get an unknown error, and the save button stays grey. On refreshing the page, it looks like it has changed, but the currencies stay exactly the same on the main subscriptions page.

The Response for save_user.php gives this:

Warning: Undefined array key "rates" in /var/www/html/endpoints/user/save_user.php on line 34

Warning: Trying to access array offset on value of type null in /var/www/html/endpoints/user/save_user.php on line 34
{"success":true}
@zach-sb
Copy link
Author

zach-sb commented Nov 10, 2023

Maybe a cause?

Line 30 of save_user.php is

$api_url = "http://data.fixer.io/api/latest?access_key=". $apiKey . "&base=" . $mainCurrencyCode . "&symbols=" . $codes;

When browsing to http://data.fixer.io/api/latest?access_key=MYACCESSKEY&base=AUD, the response is

{"success":false,"error":{"code":105,"type":"base_currency_access_restricted"}}.

EUR works fine, as does not having a base. I guess AUD as a base currency is not included in the free plan? (USD doesn't appear to be included either)

@ellite
Copy link
Owner

ellite commented Nov 10, 2023

Thank you for reporting. I will check it soon. List is getting long 🙈

@ellite ellite self-assigned this Nov 10, 2023
@ellite ellite added the bug Something isn't working label Nov 10, 2023
@ellite
Copy link
Owner

ellite commented Nov 10, 2023

Yes, only EUR is supported. But we have the exchange rate from EUR to all the others and do double conversion if needed.

@ellite
Copy link
Owner

ellite commented Nov 10, 2023

Issue should be solved with 7e4ca23

@ellite ellite closed this as completed Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants