PHPackages                             nocego/yii2-wallet - 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. nocego/yii2-wallet

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

nocego/yii2-wallet
==================

Wallet functionality for Yii2 applications.

1.0.6(5mo ago)0161MITPHPPHP &gt;=8.2

Since Dec 1Pushed 1w agoCompare

[ Source](https://github.com/nocego/yii2-wallet)[ Packagist](https://packagist.org/packages/nocego/yii2-wallet)[ RSS](/packages/nocego-yii2-wallet/feed)WikiDiscussions master Synced today

READMEChangelog (8)Dependencies (7)Versions (9)Used By (0)

yii2-wallet
===========

[](#yii2-wallet)

A simple wallet management module for Yii2 framework.

Features
--------

[](#features)

### PKPass Support

[](#pkpass-support)

- Create PKPass tickets for Apple Wallet

### Google Wallet Support

[](#google-wallet-support)

- Create Google Wallet class
- Check if a Google Wallet class exists
- Create a Google Wallet ticket
- Get a Google Wallet ticket
- Expire a Google Wallet ticket

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist nocego/yii2-wallet
```

or add

```
"nocego/yii2-wallet": "*"
```

to the require section of your composer.json

Initial Setup
-------------

[](#initial-setup)

After you have installed the extension, you need to configure the module in your application configuration file:

```
'wallet' => [
    'class' => 'nocego\yii2\wallet\Module',
    'canManageTickets' => ['admin'],
    'googleWalletConfig' => [
        'issuerId' => '1234567891011121314',
        'googleServiceAccountCredentials' => [
            "type" => "type",
            "project_id" => "project_id",
            "private_key_id" => "private_key_id",
            "private_key" => "-----BEGIN PRIVATE KEY-----\nprivate_key\n-----END PRIVATE KEY-----\n",
            "client_email" => "client_email",
            "client_id" => "123456789101112131415",
            "auth_uri" => "auth_uri",
            "token_uri" => "token_uri",
            "auth_provider_x509_cert_url" => "auth_provider_x509_cert_url",
            "client_x509_cert_url" => "client_x509_cert_url",
            "universe_domain" => "universe_domain",
        ],
        'timeToAddToValidTimeIntervalEnd' => 'P7D',
    ],
    'pkPassConfig' => [
        'certificatePath' => /srv/www/www.test.org/certificates/pkpass/certificates.p12,
        'certificatePassword' => '12.34#56',
        'organizationName' => 'MyOrganization',
        'passTypeIdentifier' => 'pass.org.test.myapp',
        'teamIdentifier' => 'AB1CDEFG2K',
        'iconUrl' => 'https://test.org/files/Wallet/icon.png',
        'logoUrl' => 'https://test.org/files/Wallet/icon.png',
    ],
]
```

Usage
-----

[](#usage)

You can use the wallet module in your application as follows:

### PKPass examples

[](#pkpass-examples)

```
$pkPassFields = [
    'description' => 'Test PKPass Ticket',
    'serialNumber' => '1234567890',
    'organizationName' => 'MyOrganization',
    'logoText' => 'My PKPass Ticket',
    'foregroundColor' => 'rgb(255, 255, 255)',
    'backgroundColor' => 'rgb(0, 0, 0)',
    // Add other necessary fields here
];
$pkPass = new PkpassModel();
$pkPass->getTicket($pkPassFields);
```

### Google Wallet create class example

[](#google-wallet-create-class-example)

```
// Google Wallet example
$classSuffix = 'test_class_suffix';
$classType = 'eventticket
$classFields = [
    'ticketFields' => [
        'eventName' => [
            'defaultValue' => [
                'language' => 'en-US',
                'value' => 'Test Event',
            ],
        ],
        'issuerName' => 'Test Issuer',
        // Add other necessary fields here
    ],
];
$wallet = new GoogleWallet();
$success = $wallet->createClass($classSuffix, $classFields, $classType);
```

### Google Wallet create ticket example

[](#google-wallet-create-ticket-example)

```
$classSuffix = 'test_class_suffix';
$objectSuffix = 'test_object_suffix';
$classFields = [
    'ticketFields' => [
        'ticketHolderName' => 'John Doe',
        'barcode': {
          'type': 'QR_CODE',
          'value': 1234567890,
        },
        // Add other necessary fields here
    ],
];
$wallet = new GoogleWallet();
$wallet->createTicket($classSuffix, $objectSuffix, $classFields);
```

REST API
--------

[](#rest-api)

The module also provides a REST API for managing wallets. You can access the API endpoints at `/rest/wallet/`. The following endpoints are available:

- `POST /rest/wallet/pkpass` Get a PKPass ticket
- `POST /rest/wallet/google-wallet/class` Create a Google Wallet class
- `GET /rest/wallet/google-wallet/{$id}/class-exists` Check if a Google Wallet class exists
- `POST /rest/wallet/google-wallet/ticket` Create a Google Wallet ticket
- `GET /rest/wallet/google-wallet/ticket/{$id}` Get a Google Wallet ticket
- `DELETE /rest/wallet/google-wallet/ticket/{$id}` Expire a Google Wallet ticket

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

[](#contributing)

Contributions are welcome! Please submit a pull request or open an issue to discuss changes.

License
-------

[](#license)

This project is licensed under the MIT License.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance87

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.7% 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 ~8 days

Total

8

Last Release

154d ago

Major Versions

0.1.0 → 1.0.02025-12-04

PHP version history (2 changes)0.1.0PHP &gt;=8.2

1.0.0PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/85ae3cc34db6597172d789467d0f8a46fe5eb08a0de587f896b45d6fc465249a?d=identicon)[nocego](/maintainers/nocego)

---

Top Contributors

[![nocego](https://avatars.githubusercontent.com/u/44623630?v=4)](https://github.com/nocego "nocego (18 commits)")[![Sandritsch91](https://avatars.githubusercontent.com/u/17873124?v=4)](https://github.com/Sandritsch91 "Sandritsch91 (1 commits)")

---

Tags

yii2google walletapple wallet

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nocego-yii2-wallet/health.svg)

```
[![Health](https://phpackages.com/badges/nocego-yii2-wallet/health.svg)](https://phpackages.com/packages/nocego-yii2-wallet)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[google/apiclient

Client library for Google APIs

9.8k205.9M1.1k](/packages/google-apiclient)[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

346132.9M112](/packages/google-cloud-core)[oat-sa/tao-core

TAO core extension

66143.7k122](/packages/oat-sa-tao-core)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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