PHPackages                             thealgoslingers/autoprice - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. thealgoslingers/autoprice

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

thealgoslingers/autoprice
=========================

The AutoPrice class provides functionalities for calculating prices dynamically based on the user's location.

v2.2.0(1y ago)111MITPHP

Since Jul 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/TheAlgoslingers/autoprice)[ Packagist](https://packagist.org/packages/thealgoslingers/autoprice)[ RSS](/packages/thealgoslingers-autoprice/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Leverage real-time data and advanced algorithms to calculate prices bases on the user's location with Autoprice.

Requirements
============

[](#requirements)

Please obtain Api Key from [IP2LOCATION.IO](https://www.ip2location.io/)Installation
============

[](#installation)

```
composer require thealgoslingers/autoprice

```

Usage
=====

[](#usage)

**NOTE:** Autoprice returns the (converted) currency with it's associated currency code. So it will not be necessary to manually add the currency(it's) code again at the end. For instance, "10" from USD to Ghanaian cedis, Autoprice will return "GHS15.152" instead of just "15.532".

Some Api plans do not include the country's currency code. In this case, the raw figures will be returned. I.e. Amount without a currency code.

See [ip2location](https://www.ip2location.io/pricing) for more details.

```
