Download the PHP package 3neti/merchant without Composer
On this page you can find all versions of the php package 3neti/merchant. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download 3neti/merchant
More information about 3neti/merchant
Files in 3neti/merchant
Package merchant
Short Description Merchant and vendor-alias helper utilities for x-change
License proprietary
Informations about the package merchant
3neti/merchant
A lightweight Merchant and Vendor Alias management package designed to support the x-change financial workflow platform.
Supported Platforms
- PHP 8.3 or 8.4
- Laravel 12 or 13
- Pest 3 or 4 for package development
Install the current minor release with:
๐งญ Overview
3neti/merchant provides a minimal, focused domain layer for:
- Merchant management
- Reusable QR merchant presentation profiles
- Vendor alias assignment and validation
- Reserved alias protection
- Clean integration with Laravel applications
It is intentionally small, strict, and domain-focused, making it ideal as a supporting package in larger financial systems like x-change.
๐ฏ Core Concepts
Merchant
Represents a business entity that can:
- Own vendor aliases
- Act as a payable / routing identity
- Be linked to a user
Vendor Alias
A short, human-readable identifier used for:
- Payment routing
- Merchant identification
- External references
Example:
QR Merchant Profile
The merchant record may also hold reusable QR presentation fields:
- display name;
- city;
- four-digit merchant category code;
- an approved display-name template.
MerchantProfileRepositoryContract resolves and updates the profile for a user. MerchantDisplayNameRenderer renders the provider-facing label with the configured length and uppercase policy.
These fields are presentation metadata. They do not identify a funding Account, derive a VCA, classify provider evidence, or authorize settlement.
โ๏ธ Features
โ Merchant Model
- Eloquent model with factory support
- Basic fillable attributes
- User โ Merchant relationship support
โ Vendor Alias Service
Handles:
Normalization
Validation Rules
- ASCII only
- Must start with a letter (AโZ)
- Length: 3โ8 characters
- Uppercase letters and digits only
Availability Checks
- Prevents duplicate aliases
- Prevents use of reserved aliases
โ
Validation Rule: ValidVendorAlias
Laravel validation rule enforcing:
- Strict format validation (no auto-correction)
- Reserved alias protection
- Configurable length limits
๐ Design Philosophy
1. Strict Input Validation
Aliases are not auto-corrected.
shopโ invalidSHOPโ valid
This ensures:
- Predictability
- Consistency
- Financial safety
2. Separation of Concerns
| Responsibility | Layer |
|---|---|
| Normalization | Service |
| Validation | Rule |
| Persistence | Database |
| Business logic | Application |
3. Financial-System Ready
Designed for:
- Payment routing
- Payable identities
- Voucher / Pay Code systems
๐งช Test Coverage
All tests passing:
Covered Areas
- Merchant model
- User โ Merchant relationship
- Alias normalization
- Alias validation (valid + invalid cases)
- ASCII enforcement
- Length constraints
- Reserved alias handling
- Error messaging
๐งฑ Database Tables
vendor_aliases
Stores assigned aliases.
reserved_vendor_aliases
Stores protected aliases (e.g. system, EMI, brands).
Example:
| alias | reason |
|---|---|
| ADMIN | System |
| ROOT | System |
| GCASH | EMI |
โ๏ธ Configuration
Keep templates limited to application-approved choices. A consumer such as x-change must validate provider length constraints before persisting a profile.
๐ Usage
Assign Alias
Validate Input
๐งญ Role in x-change
In the x-change architecture, this package provides:
- Merchant identity layer
- Provider-neutral QR presentation metadata
- Vendor alias routing key
- Integration point for payable flows
Flow:
๐ Key Takeaways
- This package is intentionally simple and strict
- It enforces clean, uppercase, deterministic identifiers
- It is built for financial-grade systems, not loose UX inputs
๐ฅ Future Enhancements (Optional)
- Alias assignment actions
- Merchant profile DTOs
- Alias โ Merchant resolver service
- Integration with voucher payable specifications
๐ License
Proprietary / Internal Use
All versions of merchant with dependencies
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
lorisleiva/laravel-actions Version ^2.9
spatie/laravel-data Version ^4.15