PHPackages                             vrpayment/plugin-core - 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. vrpayment/plugin-core

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vrpayment/plugin-core
=====================

Core functionality for the VRPayment plugins.

0.2.2(2w ago)06021Apache-2.0PHPPHP &gt;=8.2

Since Feb 13Pushed 2w agoCompare

[ Source](https://github.com/vr-payment/plugin-core)[ Packagist](https://packagist.org/packages/vrpayment/plugin-core)[ RSS](/packages/vrpayment-plugin-core/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (7)Dependencies (25)Versions (9)Used By (1)

VRPayment Plugin Core Library
=============================

[](#vrpayment-plugin-core-library)

**The canonical, framework-agnostic business logic engine for VRPayment payment integrations.**

This library abstracts the complexity of the VRPayment SDK and provides a standardized, robust implementation of payment flows. It is designed to be used as a core dependency by platform-specific plugins (Magento, WooCommerce, Shopware, etc.), decoupling **business logic** from **platform infrastructure**.

---

Core Philosophy
---------------

[](#core-philosophy)

The goal of this project is to centralize all payment business logic into a single, reusable library, decoupling it from the specific constraints of platforms like Magento or WooCommerce.

Instead of duplicating complex logic across different shop systems, `plugin-core` implements the payment workflows once, using pure PHP. This shifts the role of the shop-specific plugin:

- **Plugin Core:** Implements the business logic, manages state machines, and handles all API interactions via the SDK.
- **Shop Plugin:** Acts as an **adapter**. It interchanges data between the shop and the Core, handles database persistence, manages configuration, and integrates into the shop's frontend/backend events.

### Key Architectural Benefits

[](#key-architectural-benefits)

- **Pure PHP:** Framework-agnostic code that runs anywhere PHP runs.
- **Minimal Dependencies:** Depends only on the official `vrpayment/php-sdk`, making it lightweight and easy to port to any environment.
- **Type Safety:** Written with strict typing to catch errors early.
- **Testability:** Designed for 100% unit test coverage with isolated components.
- **PSR Standards:** Fully compliant with PSR-3 (Logging) and other standard interfaces.
- **Contract-Driven:** Clear Interfaces and Abstract Base Classes guide developers to implement the necessary platform-specific adapters correctly.

---

Key Features
------------

[](#key-features)

The library is divided into major functional components, each designed for robustness and ease of integration.

### 1. Checkout Engine

[](#1-checkout-engine)

The core of the payment flow. Handles transaction creation and management with a sophisticated "upsert" strategy, ensuring seamless navigation without duplicate charges.

- **[Read Checkout Docs](docs/Checkout/README.md)**

### 2. Webhook Processor

[](#2-webhook-processor)

The engine for handling asynchronous events from the VRPayment Portal. It's built for scale and high concurrency.

- **[Read Webhook Processor Docs](docs/Webhook/Processor/README.md)**

### 3. Webhook Management

[](#3-webhook-management)

Tools for programmatically managing webhooks in the VRPayment Portal, including URL creation and Listener setup.

- **[Read Webhook Management Docs](docs/Webhook/Management/README.md)**

### 4. Transaction Completion (Capture &amp; Void)

[](#4-transaction-completion-capture--void)

Manage the final stages of the transaction lifecycle. Finalize payments (Capture) or cancel them (Void) with dedicated service handlers.

- **[Read Completion Docs](docs/Completion/README.md)**

### 5. Recurring Payments

[](#5-recurring-payments)

Enables Merchant Initiated Transactions (MIT) for seamless subscription renewals and unscheduled subsequent charges using saved tokens.

- **[Read Recurring Docs](docs/Recurring/README.md)**

### 6. Refund Management

[](#6-refund-management)

Support for full and partial refunds. Includes precise line-item logic and validation to prevent over-refunding.

- **[Read Refund Docs](docs/Refund/README.md)**

### 7. Document Management

[](#7-document-management)

Retrieve official PDF documents (Invoices, Packing Slips, Credit Notes) directly from the VRPayment Portal for the merchants.

- **[Read Document Docs](docs/Document/README.md)**

### 8. Payment Method Service

[](#8-payment-method-service)

A centralized service to fetch available payment method configurations from the VRPayment Portal, ensuring the shop systems have an up-to-date view of available payment methods.

- **[Read Payment Method Docs](docs/PaymentMethod/README.md)**

---

Documentation
-------------

[](#documentation)

For a detailed look at how to implement each module, refer to the guides in the `docs/` directory:

- **[Checkout &amp; Transaction Flow](docs/Checkout/README.md)**: Handling the initial payment process.
- **[Webhook Integration](docs/Webhook/README.md)**: Master guide for both Processing and Management.
- **[Webhook Processor](docs/Webhook/Processor/README.md)**: Detailed guide for handling incoming notifications.
- **[Webhook Management](docs/Webhook/Management/README.md)**: Programmatic setup of listeners in the VRPayment Portal.
- **[Transaction Completion](docs/Completion/README.md)**: Capturing and voiding authorized transactions.
- **[Recurring Charges](docs/Recurring/README.md)**: Implementing tokenized subsequent payments.
- **[Refund Process](docs/Refund/README.md)**: Managing customer returns and credit notes.
- **[Official Documents](docs/Document/README.md)**: Downloading invoices and other PDF assets.
- **[Payment Method Service](docs/PaymentMethod/README.md)**: Retrieving and synchronizing payment methods configurations.

---

Examples
--------

[](#examples)

For a runnable example for each of the modules, refer to the `examples` subdirectories in each of the module directories.

- **[Checkout &amp; Transaction Flow](docs/Checkout/examples/)**: Handling the initial payment process.
- **[Webhook Processor](docs/Webhook/Processor/example/)**: Simulating state transitions and concurrent processing.
- **[Webhook Management](docs/Webhook/Management/example/)**: Lifecycle management (CLI scripts).
- **[Transaction Completion](docs/Completion/examples/)**: Capturing and voiding authorized transactions.
- **[Recurring Charges](docs/Recurring/examples/)**: Implementing tokenized subsequent payments.
- **[Refund Process](docs/Refund/examples/)**: Managing customer returns and credit notes.
- **[Official Documents](docs/Document/examples/)**: Downloading invoices and other PDF assets.
- **[Payment Method Service](docs/PaymentMethod/examples/)**: Retrieving and synchronizing payment methods configurations.

---

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

[](#installation)

```
composer require vrpayment/plugin-core
```

---

Unit Tests
----------

[](#unit-tests)

You can run the test suite to verify the library's behavior.

```
composer test
```

License
-------

[](#license)

Apache License. See \[LICENSE.txt\].

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance96

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~15 days

Total

8

Last Release

12d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/79ce1a833759c18051edb71ae575a0cf5ac10625ae6cad91d0509b9da246488f?d=identicon)[andrewrowanwallee](/maintainers/andrewrowanwallee)

---

Top Contributors

[![alberto-wallee](https://avatars.githubusercontent.com/u/109144904?v=4)](https://github.com/alberto-wallee "alberto-wallee (3 commits)")[![andrewrowanwallee](https://avatars.githubusercontent.com/u/73881084?v=4)](https://github.com/andrewrowanwallee "andrewrowanwallee (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vrpayment-plugin-core/health.svg)

```
[![Health](https://phpackages.com/badges/vrpayment-plugin-core/health.svg)](https://phpackages.com/packages/vrpayment-plugin-core)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.9k496.1k32](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3751.2M45](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

744284.3k34](/packages/civicrm-civicrm-core)[roundcube/roundcubemail

The Roundcube Webmail suite

7.0k1.4k3](/packages/roundcube-roundcubemail)[spatie/laravel-export

Create a static site bundle from a Laravel app

670139.5k6](/packages/spatie-laravel-export)[nfse-nacional/nfse-php

This is my package nfse

1493.1k](/packages/nfse-nacional-nfse-php)

PHPackages © 2026

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