PHPackages                             rcastera/payment-api - 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. [API Development](/categories/api)
4. /
5. rcastera/payment-api

ActiveLibrary[API Development](/categories/api)

rcastera/payment-api
====================

Payment API

v1.0.1(12y ago)683MITPHPPHP &gt;=5.3.0

Since Dec 17Pushed 12y ago1 watchersCompare

[ Source](https://github.com/rcastera/PaymentApi)[ Packagist](https://packagist.org/packages/rcastera/payment-api)[ Docs](http://www.richardcastera.com)[ RSS](/packages/rcastera-payment-api/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

PaymentAPI
==========

[](#paymentapi)

The PaymentAPI allows you to easily process e-commerce transactions without having to worry about all the backend details of connecting and setting up the cURL options.

- An extremely easy API.
- Extensible to add many different payment gateways.
- Consumes gateway api's using the [Guzzle client](http://guzzlephp.org/).

### Supported gateways

[](#supported-gateways)

---

There are several gateways ([Stripe](src/rcastera/PaymentAPI/Gateway/Types/Stripe/README.md), [Authorize.net](src/rcastera/PaymentAPI/Gateway/Types/Authorize/README.md) and [Paypal](src/rcastera/PaymentAPI/Gateway/Types/Paypal/README.md) to name a few) and more will be added but, if you need one that isn't supported yet, feel free to contribute. [See supported gateways.](src/rcastera/PaymentAPI/Gateway/Types/README.md)

### Setup

[](#setup)

---

Add a `composer.json` file to your project:

```
{
  "require": {
      "rcastera/payment-api": "v1.0.0"
  }
}
```

Then provided you have [composer](http://getcomposer.org) installed, you can run the following command:

```
$ composer.phar install
```

That will fetch the library and its dependencies inside your vendor folder. Then you can add the following to your .php files in order to use the library (if you don't already have one).

```
require 'vendor/autoload.php';
```

Then you need to `use` the relevant class, and instantiate the gateway.

### Example

[](#example)

---

```
require 'vendor/autoload.php';

use rcastera\PaymentAPI\Factory\PaymentFactory;
use rcastera\PaymentAPI\Exception\PaymentException;
use rcastera\PaymentApi\Util\PaymentUtil;

$authorize = PaymentFactory::get('Authorize.Aim');
```

### Utility class

[](#utility-class)

---

There's a utility class that's included for convenince. [Learn more about the Utility class](src/rcastera/PaymentAPI/Util/README.md)

### Contributing

[](#contributing)

---

1. Fork it.
2. Create a branch (`git checkout -b my_branch`)
3. Commit your changes (`git commit -am "Added something"`)
4. Push to the branch (`git push origin my_branch`)
5. Create an Issue with a link to your branch
6. Enjoy a refreshing Coke and wait

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

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

Every ~46 days

Total

2

Last Release

4532d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/212232?v=4)[Richard Castera](/maintainers/rcastera)[@rcastera](https://github.com/rcastera)

---

Top Contributors

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

---

Tags

apimoneypaymentpaye-commerce

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rcastera-payment-api/health.svg)

```
[![Health](https://phpackages.com/badges/rcastera-payment-api/health.svg)](https://phpackages.com/packages/rcastera-payment-api)
```

###  Alternatives

[comgate/sdk

Comgate PHP SDK

13373.6k](/packages/comgate-sdk)[everypay/everypay-php

1743.5k](/packages/everypay-everypay-php)

PHPackages © 2026

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