PHPackages                             kdaviesnz/cpgi - 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. kdaviesnz/cpgi

ActiveLibrary[Payment Processing](/categories/payments)

kdaviesnz/cpgi
==============

v1.0.0-alpha(8y ago)00MITPHPPHP ~7.0

Since Apr 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/kdaviesnz/cpgi)[ Packagist](https://packagist.org/packages/kdaviesnz/cpgi)[ Docs](https://github.com/kdaviesnz/cpgi)[ RSS](/packages/kdaviesnz-cpgi/feed)WikiDiscussions master Synced 1mo ago

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

cpgi
====

[](#cpgi)

Install
-------

[](#install)

Via Composer

```
$ composer require kdaviesnz/cpgi
```

Usage
-----

[](#usage)

NOTE: This is code is currently in ALPHA and is not guaranteed to work. DO NOT USE IN PRODUCTION. It has not been tested with actual payments etc. If anything, think of it as a starting point.

```
		// Create an order (Square)
		$commonPaymentGateway = new CPGI("square", "sandbox-sq0atb-xrWTG_wv3dJqYTQaTKgovw", "", "");
		$lineItem = new LineItem($commonPaymentGateway, "Widget", "a description", 10.50, "USD", 1, "Electronics");
		$lineItems = array($lineItem());
		$tax = new Tax($commonPaymentGateway, 5.00);
		$taxes = array($tax()); // 5% tax
		$discount = new Discount($commonPaymentGateway, 5.00, 2.00, "USD");
		$discounts = array($discount());
		$order = new Order($commonPaymentGateway, "testOrder", "USD", "buyer@example.com", "seller@example.com", "a test order", $lineItems, "", $taxes, $discounts );
```

Change log
----------

[](#change-log)

Please see CHANGELOG.md for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see CONTRIBUTING.md and CODE\_OF\_CONDUCT.md for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

-

License
-------

[](#license)

The MIT License (MIT). Please see LICENSE.md for more information.

cpgi

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

3042d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2062483?v=4)[kdaviesnz](/maintainers/kdaviesnz)[@kdaviesnz](https://github.com/kdaviesnz)

---

Top Contributors

[![kdaviesnz](https://avatars.githubusercontent.com/u/2062483?v=4)](https://github.com/kdaviesnz "kdaviesnz (2 commits)")

---

Tags

kdaviesnzcpgicommon payment gateway interface

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/kdaviesnz-cpgi/health.svg)

```
[![Health](https://phpackages.com/badges/kdaviesnz-cpgi/health.svg)](https://phpackages.com/packages/kdaviesnz-cpgi)
```

###  Alternatives

[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3622.8k](/packages/duncanmcclean-statamic-cargo)[ph7software/ph7cms

pH7Builder. Social Dating Web App Site Builder

1.1k1.6k](/packages/ph7software-ph7cms)[verbb/formie

The most user-friendly forms plugin for Craft.

101400.6k78](/packages/verbb-formie)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54686.7k25](/packages/solspace-craft-freeform)[flux-se/sylius-stripe-plugin

Sylius Stripe plugin using Payment Request

1256.4k2](/packages/flux-se-sylius-stripe-plugin)[goodoneuz/pay-uz

Payment: Click, Payme, Uzcard, Visa

875.1k](/packages/goodoneuz-pay-uz)

PHPackages © 2026

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