PHPackages                             thearyanahmed/ppp - 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. [API Development](/categories/api)
4. /
5. thearyanahmed/ppp

ActiveLibrary[API Development](/categories/api)

thearyanahmed/ppp
=================

Integrate the Purchasing Power Parity API into your online products and services, enabling you to offer affordable pricing globally.

v0.1(2y ago)06MITPHPPHP ^7.4|^8.0

Since Aug 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/thearyanahmed/ppp)[ Packagist](https://packagist.org/packages/thearyanahmed/ppp)[ Docs](https://github.com/thearyanahmed/ppp)[ RSS](/packages/thearyanahmed-ppp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Purchase Power Parity
=====================

[](#purchase-power-parity)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a9cf51577df3f223b6165e46958eeb7247714a40090c77a8c78fb54df61810b5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746865617279616e61686d65642f7070702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/thearyanahmed/ppp)

Implementation of [https://purchasing-power-parity.com](https://purchasing-power-parity.com/) using PHP.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require thearyanahmed/ppp
```

Usage
-----

[](#usage)

```
use Thearyanahmed\Ppp\Request;
$response = (new Request)->fetchPPP('DE');
```

The response can be either `SuccessfulResponse` or `ErrorResponse`. The `SuccessResponse` contains the fields with getter methods. Eg: `pppConversionFactor` can be accessed via `getPppConversionFactor()`.

Available methods

```
# SuccessResponse
    public function getCountryCodeAlpha2() : string
    public function getCountryCodeAlpha3() : string
    public function getMainCurrencyName() : string
    public function getMainCurrencySymbol() : string
    public function getPppConversionFactor() : float
    public function getPPP() : float
    public function isSuccessful() : bool # will always return true

# ErrorResponse
    public function getMessage() : string
    public function isSuccessful() : bool # will always return false
```

If it's not a HTTP 200 request,\*\*\*\* it'll throw an generic exception.

Usage
-----

[](#usage-1)

```
   $response = (new Request)->fetchPPP('DE');

   if($response->isSuccessful()) {
        $discountPrice = $response->getPppConversionFactor() * $originalPrice;
   }
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Aryan Ahmed](https://github.com/thearyanahmed)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

PHP Package Boilerplate
-----------------------

[](#php-package-boilerplate)

This package was generated using the [PHP Package Boilerplate](https://laravelpackageboilerplate.com) by [Beyond Code](http://beyondco.de/).

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

992d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/471a586d6bef84fb7c734cb196deb8a2769559faf77d59051b080a2bd2fb309a?d=identicon)[thearyanahmed](/maintainers/thearyanahmed)

---

Top Contributors

[![thearyanahmed](https://avatars.githubusercontent.com/u/20617352?v=4)](https://github.com/thearyanahmed "thearyanahmed (6 commits)")

---

Tags

pppthearyanahmed

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thearyanahmed-ppp/health.svg)

```
[![Health](https://phpackages.com/badges/thearyanahmed-ppp/health.svg)](https://phpackages.com/packages/thearyanahmed-ppp)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
