Download the PHP package misaf/vendra-affiliate without Composer
On this page you can find all versions of the php package misaf/vendra-affiliate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download misaf/vendra-affiliate
More information about misaf/vendra-affiliate
Files in misaf/vendra-affiliate
Package vendra-affiliate
Short Description Affiliate and referral management system with commission tracking and user referral capabilities
License MIT
Homepage https://github.com/misaf/vendra-affiliate
Informations about the package vendra-affiliate
Vendra Affiliate
A full affiliate program for Vendra: referral codes and links, click tracking,
signup attribution, a per-conversion commission ledger, and payout settlement
into the misaf/vendra-transaction wallet — with a Filament admin cluster and
stats widgets.
Features
- Each affiliate gets a unique referral code and a
/r/{code}redirect link. - Visiting the link records an
AffiliateClickand drops an attribution cookie (code|clickId). - When a visitor registers, the referral cookie binds them to the affiliate
(
AffiliateReferral) — each user is attributed at most once and self-referrals are ignored. -
Conversions credit
AffiliateCommissionledger entries idempotently:- Deposit — a referred user's approved deposit credits
commission_percentof the amount whenTransactionApprovedfires. Approval is final, so the commission is never reversed automatically. - Signup — a fixed bounty per attributed registration.
- Checkout — host applications call
RecordCartConversionActionfrom their checkout flow (vendra-cart has no checkout event yet).
Both the deposit and checkout conversions find the referrer through
AffiliateReferral::forUser(), and credit nothing when its affiliate is gone. - Deposit — a referred user's approved deposit credits
ProcessAffiliatePayoutActionsettles approved commissions atomically: it groups them into anAffiliatePayout, marks them paid, and credits the affiliate's default-currency wallet through an approved Commission transaction. If the transaction cannot be created or settled, everything rolls back and the commissions remain payable.AffiliateCommission::payable()(approved and not yet in a payout) selects what it settles, andearned()(approved or paid) is what the dashboards total.
Each store toggles the conversion types on the affiliate settings page
(Settings\AffiliateSettings), alongside the referral cookie lifetime and
redirect, commission auto-approval, the payout minimum, and the defaults for new
affiliates. The platform defaults are seeded by the package's settings
migration. config/vendra-affiliate.php keeps only the cookie name and the
payout gateway.
Requirements
- PHP 8.4+
- Laravel 13
- Filament 5
misaf/vendra-supportmisaf/vendra-transactionmisaf/vendra-user
Installation
Optionally publish the configuration and translations:
Optional tags
Install misaf/vendra-tagger to assign affiliate-typed tags from the affiliate form and display them in the table. Affiliate imports neither Vendra Tagger nor Spatie Tags; the optional relationship is resolved through misaf/vendra-support.
Demo seeders use bundled JSON fixtures in production and when their declared factory classes are unavailable. Local monorepo development continues to use factories when they are autoloadable.
Testing
Run the package checks from the project root:
License
MIT. See LICENSE.
All versions of vendra-affiliate with dependencies
misaf/vendra-support Version self.version
misaf/vendra-transaction Version self.version
misaf/vendra-user Version self.version
spatie/laravel-package-tools Version ^1.93.1
spatie/laravel-queueable-action Version ^2.17