PHPackages                             johnkhansrc/iaphub-bundle - 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. johnkhansrc/iaphub-bundle

ActiveSymfony-bundle[API Development](/categories/api)

johnkhansrc/iaphub-bundle
=========================

An Iaphub integration for symfony application for receive webhooks and manage Iaphub API

v3.1.0(2y ago)3949MITPHPPHP &gt;=8.3

Since Feb 3Pushed 2y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (8)Versions (14)Used By (0)

iaphub-bundle
=============

[](#iaphub-bundle)

A project initiated by [EmprunteMonToutou](https://github.com/empruntemontoutou)

An Iaphub integration for symfony application for receive webhooks and manage Iaphub API
----------------------------------------------------------------------------------------

[](#an-iaphub-integration-for-symfony-application-for-receive-webhooks-and-manage-iaphub-api)

**

**Work in progress**

### Installation

[](#installation)

Use Composer to install this bundle:

```
composer require johnkhansrc/iaphub-bundle

```

Add the bundle in your application kernel:

```
// app/AppKernel.php

public function registerBundles()
{
    return [
        // ...
        Johnkhansrc\IaphubBundle\IaphubBundle::class => ['dev' => true],
        // ...
    ];
}
```

Add service configuration file

```
#  config/packages/johnkhansrc_iaphub_bundle.yaml

johnkhansrc_iaphub:
  apikey: 'your-iaphub-api-key'
  webhook_auth_token: 'your-iaphub-webhook-auth-token'
```

Define your webhook URL

```
#  config/routes/johnkhansrc_iaphub_bundle.yaml

_iaphub_bundle:
  resource: '@IaphubBundle/Ressources/config/routes.xml'
  prefix: '/iaphub/webhook_entrypoint'
```

### Usage

[](#usage)

#### Webhooks

[](#webhooks)

All webhook emit symfony event

Go webhooks documentation and design your market strategies.

**Webhook****Event alias****Event class**Purchaseiaphub.webhook.purchaseIaphubPurchaseEventRefundiaphub.webhook.refundIaphubRefundEventUser id updateiaphub.webhook.user\_id\_updateIaphubUserIdUpdateEventSubscription renewaliaphub.webhook.subscription\_renewalIaphubSubscriptionRenewalEventSubscription renewal retryiaphub.webhook.subscription\_renewal\_retryIaphubSubscriptionRenewalRetryEventSubscription grace period expireiaphub.webhook.subscription\_grace\_period\_expireIaphubSubscriptionGracePeriodExpireEventSubscription product changeiaphub.webhook.subscription\_product\_changeIaphubSubscriptionProductChangeEventSubscription replaceiaphub.webhook.subscription\_replaceIaphubSubscriptionReplaceEventSubscription canceliaphub.webhook.subscription\_cancelIaphubSubscriptionCancelEventSubscription uncanceliaphub.webhook.subscription\_uncancelIaphubSubscriptionUnCancelEventSubscription expireiaphub.webhook.subscription\_expireIaphubSubscriptionExpireEventSubscription pauseiaphub.webhook.subscription\_pauseIaphubSubscriptionPauseEventSubscription pause enablediaphub.webhook.subscription\_pause\_enabledIaphubSubscriptionPauseEnabledEventSubscription pause disablediaphub.webhook.subscription\_pause\_disabledIaphubSubscriptionPauseDisabledEventeq (for an EventSubscriberInterface)

```
    public static function getSubscribedEvents(): array
    {
        return [
            IaphubPurchaseEvent::NAME => ['onIaphubPurchaseEvent', 1],
            IaphubRefundEvent::NAME => ['onIaphubRefundEvent', 1],
            IaphubUserIdUpdateEvent::NAME => ['onIaphubUserIdUpdateEvent', 1],
            IaphubSubscriptionRenewalEvent::NAME => ['onIaphubSubscriptionRenewalEvent', 1],
            IaphubSubscriptionRenewalRetryEvent::NAME => ['onIaphubSubscriptionRenewalRetryEvent', 1],
            IaphubSubscriptionGracePeriodExpireEvent::NAME => ['onIaphubSubscriptionGracePeriodExpireEvent', 1],
            IaphubSubscriptionProductChangeEvent::NAME => ['onIaphubSubscriptionProductChangeEvent', 1],
            IaphubSubscriptionReplaceEvent::NAME => ['onIaphubSubscriptionReplaceEvent', 1],
            IaphubSubscriptionCancelEvent::NAME => ['onIaphubSubscriptionCancelEvent', 1],
            IaphubSubscriptionUnCancelEvent::NAME => ['onIaphubSubscriptionUnCancelEvent', 1],
            IaphubSubscriptionExpireEvent::NAME => ['onIaphubSubscriptionExpireEvent', 1],
            IaphubSubscriptionPauseEvent::NAME => ['onIaphubSubscriptionPauseEvent', 1],
            IaphubSubscriptionPauseEnabledEvent::NAME => ['onIaphubSubscriptionPauseEnabledEvent', 1],
            IaphubSubscriptionPauseDisabledEvent::NAME => ['onIaphubSubscriptionPauseDisabledEvent', 1],
        ];
    }
```

#### Iaphub API

[](#iaphub-api)

All API method is provided from the **Johnkhansrc\\IaphubBundle\\Iaphub** public service.

**Get the client**

eq

```
public function __construct(Iaphub $iaphub)
{
    $client = $iaphub->apiClient();

    $purchaseId = 'XXXX';
    $appId = 'ZZZZ';

    $client->getSubscription($purchaseId, $appId);
}
```

**Methods**

```
    /**
     * https://www.iaphub.com/docs/api/get-user
     * @throws IaphubApiResponseException
     * @throws RedirectionExceptionInterface
     * @throws DecodingExceptionInterface
     * @throws ClientExceptionInterface
     * @throws TransportExceptionInterface
     * @throws ServerExceptionInterface
     * @throws Exception
     */
    public function getUser(string $userId, string $appId, ?array $queryParameters = null): GetUserApiResponse

    /**
     * https://www.iaphub.com/docs/api/get-user-migrate
     * @throws IaphubApiResponseException
     * @throws RedirectionExceptionInterface
     * @throws DecodingExceptionInterface
     * @throws ClientExceptionInterface
     * @throws TransportExceptionInterface
     * @throws ServerExceptionInterface|IaphubBundleBadQueryStringException
     */
    public function getUserMigrate(string $userId, string $appId, ?array $queryParameters = null): string

    /**
     * https://www.iaphub.com/docs/api/post-user
     * @throws TransportExceptionInterface
     * @throws IaphubBundleBadQueryStringException
     */
    public function postUser(string $userId, array $payloadData, string $appId): void

    /**
     * https://www.iaphub.com/docs/api/post-user-receipt
     * @throws TransportExceptionInterface
     * @throws IaphubBundleBadQueryStringException
     * @throws ServerExceptionInterface
     * @throws RedirectionExceptionInterface
     * @throws DecodingExceptionInterface
     * @throws ClientExceptionInterface
     */
    public function postUserReceipt(string $userId, array $payloadData, string $appId): PostUserReceiptResponse

    /**
     * https://www.iaphub.com/docs/api/get-purchase
     * @throws IaphubApiResponseException
     * @throws RedirectionExceptionInterface
     * @throws DecodingExceptionInterface
     * @throws ClientExceptionInterface
     * @throws TransportExceptionInterface
     * @throws ServerExceptionInterface
     * @throws IaphubBundleBadQueryStringException
     */
    public function getPurchase(string $purchaseId, string $appId, ?array $queryParameters = null): Purchase

    /**
     * https://www.iaphub.com/docs/api/get-purchases
     * @throws IaphubApiResponseException
     * @throws RedirectionExceptionInterface
     * @throws DecodingExceptionInterface
     * @throws ClientExceptionInterface
     * @throws TransportExceptionInterface
     * @throws ServerExceptionInterface|IaphubBundleBadQueryStringException
     */
    public function getPurchases(string $appId, ?array $queryParameters = null): GetPurchases

    /**
     * https://www.iaphub.com/docs/api/get-subscription
     * @throws IaphubApiResponseException
     * @throws RedirectionExceptionInterface
     * @throws DecodingExceptionInterface
     * @throws ClientExceptionInterface
     * @throws TransportExceptionInterface
     * @throws ServerExceptionInterface|IaphubBundleBadQueryStringException
     * @throws Exception
     */
    public function getSubscription(string $originalPurchaseId, string $appId, ?array $queryParameters = null): Purchase

    /**
     * https://www.iaphub.com/docs/api/get-receipt
     * @throws IaphubApiResponseException
     * @throws RedirectionExceptionInterface
     * @throws DecodingExceptionInterface
     * @throws ClientExceptionInterface
     * @throws TransportExceptionInterface
     * @throws ServerExceptionInterface
     * @throws Exception
     */
    public function getReceipt(string $receiptId, string $appId, ?array $queryParameters = null): Receipt
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity71

Established project with proven stability

 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

Every ~66 days

Recently: every ~158 days

Total

11

Last Release

890d ago

Major Versions

v1.1.2 → v2.0.02022-03-23

v2.0.1 → v3.0.02023-09-15

PHP version history (3 changes)v1.0.0PHP ^7.4

v3.0.0PHP &gt;=8.2

v3.1.0PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d317b36a0ec0c08560e9b8569232447bf74b9073dcfd5c555e4f55433b84ab9?d=identicon)[johnkhansrc](/maintainers/johnkhansrc)

---

Top Contributors

[![johnkhansrc](https://avatars.githubusercontent.com/u/28094259?v=4)](https://github.com/johnkhansrc "johnkhansrc (42 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/johnkhansrc-iaphub-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/johnkhansrc-iaphub-bundle/health.svg)](https://phpackages.com/packages/johnkhansrc-iaphub-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M648](/packages/sylius-sylius)

PHPackages © 2026

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