IP Pro driver doesn't return currency
robdekort opened this issue · 2 comments
robdekort commented
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 commented
Hi @robdekort,
Thanks for your kind words! Yes absolutely -- send a PR and I can have it merged and released 🙏
robdekort commented
Oh love it, thanks, just submitted a PR that should fix this.