PHPackages                             3neti/emi-paynamics - 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. [Payment Processing](/categories/payments)
4. /
5. 3neti/emi-paynamics

ActiveLibrary[Payment Processing](/categories/payments)

3neti/emi-paynamics
===================

Paynamics Constellation adapter for EMI core

v1.0.0(3mo ago)04proprietaryPHPPHP ^8.3

Since Apr 1Pushed 1w agoCompare

[ Source](https://github.com/3neti/emi-paynamics)[ Packagist](https://packagist.org/packages/3neti/emi-paynamics)[ RSS](/packages/3neti-emi-paynamics/feed)WikiDiscussions main Synced 4w ago

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

lbhurtado/emi-paynamics-constellation
=====================================

[](#lbhurtadoemi-paynamics-constellation)

Concrete Paynamics Constellation adapter for `lbhurtado/emi-core`. Implements wallet management, fund transfers, cash-in/out, OTP verification, phantom wallets, and value-added services against the Constellation v1.42 API.

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 12 or 13
- `lbhurtado/emi-core`

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

[](#installation)

```
composer require lbhurtado/emi-paynamics-constellation
```

The package auto-discovers its service provider. Publish the config:

```
php artisan vendor:publish --tag=constellation-config
```

Configuration
-------------

[](#configuration)

Add to your `.env`:

```
CONSTELLATION_BASE_URL=https://asterism.payserv.net/v1
CONSTELLATION_USERNAME=your_username
CONSTELLATION_PASSWORD=your_password
CONSTELLATION_MERCHANT_KEY=your_merchant_key
CONSTELLATION_NOTIFICATION_URL=https://your-app.com/webhooks/constellation

```

API Coverage
------------

[](#api-coverage)

All actions use the Laravel Actions pattern (`Lorisleiva\Actions`) and can be called via `Action::run(...)`.

### Wallet Management

[](#wallet-management)

- `AddMerchantWallet::run($data)` — create merchant wallet
- `AddCustomerWallet::run($data)` — create customer wallet
- `AddPhantomWallet::run($data)` — create phantom wallet
- `EditWallet::run($walletId, $data)` — PATCH semantics, only sends provided fields
- `GetWalletDetails::run($walletIdOrExternalUid)` — fetch wallet details
- `GetWalletBalance::run($walletId)` — fetch balance + limit fields
- `GenerateKycKybLink::run($data)` — generate KYC/KYB capture link

### Fund Transfers (staged lifecycle)

[](#fund-transfers-staged-lifecycle)

- `PreTransfer::run($data)` — reserve/withhold funds
- `SettleTransfer::run($data)` — commit withheld transfer
- `CancelTransfer::run($data)` — release withheld transfer

### Cash In

[](#cash-in)

- `CreateCashIn::run($data)` — initiate cash-in with payment method/channel

### Cash Out

[](#cash-out)

- `CreateCashOut::run($data)` — initiate cash-out to registered bank
- `CreateCashOutOtp::run($data)` — request OTP for cash-out
- `VerifyTransaction::run($data)` — verify with PIN/OTP

### Bank Accounts

[](#bank-accounts)

- `AddBankAccount::run($data)` — register a bank account

### Phantom Wallets &amp; Withheld Funds

[](#phantom-wallets--withheld-funds)

- `GetWithheldByWalletId::run($walletId)`
- `GetWithheldByPhantomWalletId::run($phantomWalletId)`

### Value Added Services

[](#value-added-services)

- `AirtimeLoad::run($data)` — airtime/load purchase
- `BillsPayment::run($data)` — bills payment

### Transaction Queries

[](#transaction-queries)

- `GetTransactionByRequestId::run($requestId)`
- `GetTransactionByWalletId::run($walletId)`

### Webhooks

[](#webhooks)

- `HandleConstellationWebhook::run($payload)` — idempotent postback handler with signature verification

Signature Handling
------------------

[](#signature-handling)

All signed requests use SHA512 hex-encoded signatures. The `ConstellationSigner` concatenates specific fields per endpoint + the merchant key. The `ConstellationSignatureVerifier` validates postback signatures using `code + message + advise + timestamp + merchant_key`.

Who Uses What
-------------

[](#who-uses-what)

ActorRoleCommandVolume**Platform Operator**Runs x-change (creates Settlement + Revenue wallets)`constellation:setup`Once**Issuer (B2B)**Merchant subscribing to x-change to generate Pay Codes`constellation:create-merchant`Low (per client)**Customer (End User)**Subscriber who wants to hold a balance`constellation:create-customer`Optional**Redeemer**Receives Pay Code, redeems to bank accountNone — just bank detailsN/A- `constellation:setup` creates the **infrastructure wallets** (Settlement + Revenue) that the platform itself uses for escrow settlement and fee collection. Run once during system deployment.
- `constellation:create-merchant` onboards a **B2B issuer** — a company that tops up their wallet and generates Pay Codes for distribution.
- `constellation:create-customer` onboards an **end-user subscriber** who wants to hold a balance. **Optional** — not needed for basic Pay Code redemption.
- **Redeemers don't need a Constellation wallet.** They just provide bank details (account number + bank code) and cash-out goes directly from the platform's settlement wallet to their bank via InstaPay/PesoNet.

Artisan Commands
----------------

[](#artisan-commands)

The package ships with 48 artisan commands (hub + setup + 46 endpoint commands), auto-registered via the ServiceProvider. All commands support a `--fake` flag for offline testing and include structured audit logging.

### Interactive Hub

[](#interactive-hub)

```
php artisan constellation          # Interactive launcher — select any command from a grouped menu
php artisan constellation --fake   # Same, but all selected commands use fake HTTP responses
```

### Onboarding &amp; Wallet Lifecycle

[](#onboarding--wallet-lifecycle)

```
php artisan constellation:probe                          # Smoke test — verify API credentials
php artisan constellation:create-merchant                # Interactive — create merchant wallet
php artisan constellation:create-customer                # Interactive — create customer wallet
php artisan constellation:create-phantom                 # Create phantom wallet
php artisan constellation:wallet-details {walletId}      # Get wallet details
php artisan constellation:wallet-balance {walletId}      # Get balance + limits
php artisan constellation:edit-wallet {walletId}         # Interactive PATCH — update wallet fields
php artisan constellation:kyc-link {accountId} {level}   # Generate KYC/KYB capture link
php artisan constellation:lock-wallet {walletId}         # Lock wallet
php artisan constellation:unlock-wallet {walletId}       # Unlock wallet
php artisan constellation:set-threshold {walletId} {amt} # Set minimum balance threshold
```

### Cash In

[](#cash-in-1)

```
php artisan constellation:payment-channels               # List available payment channels
php artisan constellation:cash-in {walletId} {amount}    # Interactive — initiate cash-in
php artisan constellation:cash-in-status {requestId}     # Check cash-in status by request ID
php artisan constellation:cash-ins {accountId}           # List cash-ins by account ID
```

### Fund Transfer

[](#fund-transfer)

```
php artisan constellation:pre-transfer {src} {dst} {amt} # Pre-transfer (withhold)
php artisan constellation:settle-transfer {requestId}    # Settle a pre-transfer
php artisan constellation:cancel-transfer {requestId}    # Cancel a pre-transfer
```

### Cash Out

[](#cash-out-1)

```
php artisan constellation:supported-banks                # List supported banks
php artisan constellation:add-bank-account {accountId}   # Interactive — register bank account
php artisan constellation:edit-bank-account {id}         # Interactive — edit bank account
php artisan constellation:remove-bank-account {id}       # Remove a bank account
php artisan constellation:bank-accounts {accountId}      # List registered bank accounts
php artisan constellation:request-otp                    # Interactive — request OTP for cash-out
php artisan constellation:resend-otp {acctId} {reqId}    # Resend cash-out OTP
php artisan constellation:verify-transaction             # Interactive — verify with PIN
php artisan constellation:cash-out {accountId} {amount}  # Interactive — cash out (registered bank)
php artisan constellation:cash-out-nr {acctId} {amount}  # Interactive — cash out (non-registered bank)
php artisan constellation:cash-out-status {requestId}    # Check cash-out status
php artisan constellation:cash-outs {accountId}          # List cash-outs by account ID
```

### Transactions &amp; Withheld

[](#transactions--withheld)

```
php artisan constellation:transaction {requestId}        # Get transaction by request ID
php artisan constellation:transactions {walletId}        # Get transactions by wallet ID
php artisan constellation:withheld {walletId}            # Withheld funds by wallet ID
php artisan constellation:withheld-by-account {acctId}   # Withheld funds by account ID
php artisan constellation:withheld-phantom {phantomId}   # Withheld funds by phantom wallet ID
```

### Value Added Services

[](#value-added-services-1)

```
php artisan constellation:airtime-products               # List airtime products
php artisan constellation:airtime-load                   # Interactive — purchase airtime
php artisan constellation:airtime-status {requestId}     # Check airtime load status
php artisan constellation:airtime-history                # Interactive — airtime history by partner
php artisan constellation:billers                        # List billers
php artisan constellation:biller-details {billerCode}    # Get biller details
php artisan constellation:biller-fee                     # Interactive — get biller fee
php artisan constellation:biller-request {billerCode}    # Generate biller payment request
php artisan constellation:pay-bill                       # Interactive — pay a bill
php artisan constellation:bill-status {requestId}        # Check bill payment status
php artisan constellation:bill-history                   # Interactive — bill history by partner
```

### The `--fake` Flag

[](#the---fake-flag)

Every command supports `--fake` to run without hitting the live Paynamics API:

```
php artisan constellation:probe --fake                   # Uses fixture responses, zero network calls
php artisan constellation:wallet-balance FAKE01 --fake   # Works with any wallet ID in fake mode
```

Fake mode uses realistic fixture responses matching the Constellation v1.42 API format. Commands display a warning when running in fake mode.

### Audit Logging

[](#audit-logging)

All commands log structured JSON to `storage/logs/constellation/constellation-YYYY-MM-DD.log`:

```
{"command":"constellation:probe","is_fake":false,"input":{"action":"probe"},"operator":"rli","timestamp":"2026-03-24T22:56:28+00:00"}
{"command":"constellation:probe","is_fake":false,"success":true,"duration_ms":1006,"timestamp":"2026-03-24T22:56:29+00:00"}
```

Sensitive fields (password, pin, otp, signature) are automatically redacted in logs. The log channel is configurable via `CONSTELLATION_LOG_CHANNEL` in `.env`.

Architecture
------------

[](#architecture)

```
ConstellationClient           — HTTP wrapper (Basic Auth, JSON, base URL from config)
ConstellationSigner           — SHA512 request signature generation
ConstellationSignatureVerifier — postback signature verification
ConstellationServiceProvider  — binds contracts, loads config/migrations/routes/commands

Actions/                      — 46 actions covering all Constellation v1.42 endpoints
  Wallets/                    — 11 actions (Add/Edit/Get/Lock/Unlock/Threshold/KYC/Profiles)
  Transfers/                  — 3 actions (Pre/Settle/Cancel)
  CashIn/                     — 4 actions (Create + queries)
  CashOut/                    — 8 actions (Create/OTP/Verify + queries)
  BankAccounts/               — 4 actions (Add/Edit/Remove/Get)
  PhantomWallets/             — 3 query actions
  ValueAddedServices/         — 11 actions (Airtime + Bills + queries)
  Transactions/               — 2 query actions
  Webhooks/                   — 1 idempotent handler

Console/
  Commands/                   — 47 artisan commands (hub + 46 endpoint commands)
  Concerns/
    FakesConstellationHttp    — --fake flag trait with fixture responses
    LogsConstellationActivity — Structured JSON audit logging trait

```

Testing
-------

[](#testing)

```
# From the monorepo host
composer test:constellation
```

All action tests use `Http::fake()` — no live API calls during testing.

License
-------

[](#license)

Proprietary — Lester Hurtado

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance91

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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

90d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/586e1ed70140038e6348728222adbcf68bfc4455b1f94a4f8bcbe57917a63d57?d=identicon)[3neti](/maintainers/3neti)

---

Top Contributors

[![3neti](https://avatars.githubusercontent.com/u/89447696?v=4)](https://github.com/3neti "3neti (12 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/3neti-emi-paynamics/health.svg)

```
[![Health](https://phpackages.com/badges/3neti-emi-paynamics/health.svg)](https://phpackages.com/packages/3neti-emi-paynamics)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)

PHPackages © 2026

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