Skip to content

Resolve "Currency Converter API" can not get Currency Rate #24008

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

Conversation

edenduong
Copy link
Contributor

Description (*)

Resolve "Currency Converter API" can not get Currency Rate.

As my inspection, https://free.currencyconverterapi.com/ now required the API key.

image

But now in Magento 2.3, it doesn't have the API Key config. => Missing information and can not get the rate.

Solution: Add the "API Key" config to the settings, pass the key to the API Url.

Fixed Issues (if relevant)

  1. "Currency Converter API" notify "Notice: Undefined index" when import currency rate #24007: "Currency Converter API" notify "Notice: Undefined index" when import currency rate

Manual testing scenarios (*)

- When no fill API Key

  1. Go to Backend
  2. Store -> Currency Rate
  3. "Import Service" choose "Currency Converter API"
  4. Click "Import"

Expected result

  1. Notify correct error message

- When fill correct API Key

  1. Get API from https://free.currencyconverterapi.com/ (by register)
  2. Store->Configurations->Currency Setup
  3. Currency Converter API -> API Key. Fill the API Key get from email which sent by https://free.currencyconverterapi.com/
  4. Store -> Currency Rate
  5. "Import Service" choose "Currency Converter API"
  6. Click "Import"

Expected result

  1. Get the rate successfully from currencyconverterapi

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Aug 3, 2019

Hi @edenduong. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@edenduong edenduong force-pushed the 2.3-bugfix/currency_converter_notice_error_issue24007 branch 2 times, most recently from dff10dd to 3137c88 Compare August 4, 2019 00:48
@edenduong edenduong requested a review from sidolov August 4, 2019 09:17
@edenduong edenduong force-pushed the 2.3-bugfix/currency_converter_notice_error_issue24007 branch from 325051f to e4f4701 Compare August 5, 2019 00:49
@edenduong edenduong requested review from swnsma and Stepa4man August 8, 2019 07:33
@ghost ghost assigned swnsma Aug 8, 2019
@swnsma swnsma self-requested a review August 9, 2019 13:52
@magento-engcom-team
Copy link
Contributor

Hi @swnsma, thank you for the review.
ENGCOM-5574 has been created to process this Pull Request

@engcom-Alfa
Copy link
Contributor

Hi @edenduong !

During testing we faced an issue.

Problem: Duplicate "Invalid Free API Key..." error message

Steps to reproduce:

  1. Go to Admin->Stores->Configuration->Currency Setup;
  2. Select 3 or more currencies in "Allowed Currencies" block;
  3. In "Currency Converter API" block set wrong API code -> Save;
  4. Go to System->Currency Rates;
  5. Select "Currency Converter API" from "Import Service" dropdown;
  6. Click on "Import" button;

Actual Result:
screen

@edenduong Could you take a look?

Thanks!

@edenduong
Copy link
Contributor Author

Hello @engcom-Alfa,

I have changed the source code. You can check it again.

Hi @swnsma : Please review my new changes. Thanks!

@swnsma swnsma self-requested a review August 15, 2019 08:01
Copy link
Contributor

@swnsma swnsma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems OK for me.

@magento-engcom-team
Copy link
Contributor

Hi @swnsma, thank you for the review.
ENGCOM-5574 has been created to process this Pull Request

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

@m2-assistant
Copy link

m2-assistant bot commented Aug 16, 2019

Hi @edenduong, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants