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

IP Pro driver doesn't return currency #164

Closed
robdekort opened this issue Apr 9, 2024 · 2 comments · Fixed by #165
Closed

IP Pro driver doesn't return currency #164

robdekort opened this issue Apr 9, 2024 · 2 comments · Fixed by #165

Comments

@robdekort
Copy link
Contributor

Thank you for this awesome package. For a commercial client I just switched to IP API Pro. However, it seems this driver doesn't return all fields. For example: the currency field is null by default when using

When I update IpApiPro.php driver to the following, the expected fields are returned:

<?php

namespace Stevebauman\Location\Drivers;

class IpApiPro extends IpApi
{
    /**
     * {@inheritDoc}
     */
    public function url(string $ip): string
    {
        $key = config('location.ip_api.token');

        return "https://pro.ip-api.com/json/$ip?key=$key&fields=status,message,country,countryCode,region,regionName,city,zip,lat,lon,timezone,currency,isp,org,as,query";
    }
}

Do you welcome a PR for this?

@stevebauman
Copy link
Owner

Hi @robdekort,

Thanks for your kind words! Yes absolutely -- send a PR and I can have it merged and released 🙏

@robdekort
Copy link
Contributor Author

Oh love it, thanks, just submitted a PR that should fix this.

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

Successfully merging a pull request may close this issue.

2 participants