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 2mo 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 10% 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

2944d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b63930ad10271ff6fe9e1ce3446ebc46b67edda7afc70fd09a3970f55215617?d=identicon)[kdaviesnz](/maintainers/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

[spatie/laravel-stripe-webhooks

Handle stripe webhooks in a Laravel application

5213.1M8](/packages/spatie-laravel-stripe-webhooks)[tightenco/nova-stripe

A tool to create a quick Stripe dashboard in your Laravel Nova admin panels

110308.9k](/packages/tightenco-nova-stripe)[duncanmcclean/simple-commerce

A simple, yet powerful e-commerce addon for Statamic.

16313.2k2](/packages/duncanmcclean-simple-commerce)[flux-se/payum-stripe

Payum Stripe gateways

29407.5k4](/packages/flux-se-payum-stripe)[payum/stripe

The Payum extension. It provides Stripe payment integration.

22573.1k3](/packages/payum-stripe)[craftcms/commerce-stripe

Stripe integration for Craft Commerce 5.0+

32157.4k3](/packages/craftcms-commerce-stripe)

PHPackages © 2026

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