PHPackages                             iodigital/peachpayment - 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. iodigital/peachpayment

ActiveLibrary[Payment Processing](/categories/payments)

iodigital/peachpayment
======================

A library to help integrate Peach Payments

1.0.0(4y ago)23.2k1[9 PRs](https://github.com/io-digital/PeachPayment/pulls)MITPHP

Since Apr 17Pushed 3y ago3 watchersCompare

[ Source](https://github.com/io-digital/PeachPayment)[ Packagist](https://packagist.org/packages/iodigital/peachpayment)[ Docs](https://github.com/iodigital/peachpayment)[ RSS](/packages/iodigital-peachpayment/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (27)Used By (0)

PeachPayment
============

[](#peachpayment)

**This is a work in progress.**

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

[](#installation)

Via Composer

```
$ composer require iodigital/peachpayment
```

This package uses auto discovery but can be added to your `config/app.php` providers by adding `\IoDigital\PeachPayment\PeachPaymentServiceProvider::class,`

You can publish the assets with the following: `php artisan vendor:publish --tag=peachpayment-config``php artisan vendor:publish --tag=peachpayment-migrations`

### Config file

[](#config-file)

The configuration file provides you with the ability of adding your production and test Peach Payment credentials. The package does a check against your app environment.

The variables that can be used are:

- `PEACH_PAYMENTS_USER_ID`
- `PEACH_PAYMENTS_PASSWORD`
- `PEACH_PAYMENTS_AUTHORIZATION_HEADER`
- `PEACH_PAYMENTS_ENTITY_ID_ONCE_OFF`
- `PEACH_PAYMENTS_ENTITY_ID_RECURRING`
- `PEACH_PAYMENTS_TEST_MODE`
- `PEACH_PAYMENTS_NOTIFICATION_URL`
- `PEACH_PAYMENTS_WEBHOOK_SECRET_KEY`

### Migrations

[](#migrations)

#### `payment_cards`

[](#payment_cards)

This table can be used in conjunction with Server to Server functionality.

#### `payment_results`

[](#payment_results)

This table can be used to store the results of transactions.

#### `payment_events`

[](#payment_events)

This table can be used to store the event data received from webhooks.

Usage
-----

[](#usage)

This package provides the ability of using Server to Server and COPYandPay. Fairly simple to get either one going:

```
$client = (new PeachPayment())->initServerToServer();
// or
$client = (new PeachPayment())->initCopyAndPay();
```

As explained further below, you can also override your Peach Payment credentials on the fly:

```
$client = (new PeachPayment())->initServerToServer($settings);
```

Where `$settings` is a fluent class.

Methods available to Server to Server:

```
registerCard(CardBuilder $card);
registerCardDuringPayment(CardBuilder $card);
repeatedPayment(PaymentCard $card, $owner, int $amount, string $type = PaymentScheme::REPEATED_PAYMENT);
oneClickPayment(PaymentCard $card, int $amount);
paymentStatus(string $paymentId);
deleteCard(string $registrationId);

// Available options for $type in repeatedPayment()
PaymentScheme::INITIAL_PAYMENT;
PaymentScheme::REPEATED_PAYMENT;
```

Methods available to COPYandPAY:

```
prepareCheckout(int $amount);
getCheckoutRegistrationResult($checkoutId);
registerCard();
registerCardDuringPayment(int $amount);
repeatedPayment(PaymentCard $card, $owner, int $amount, string $type = PaymentScheme::REPEATED_PAYMENT);
paymentStatus(string $checkoutId);
```

To determine the result of a transaction with Peach Payment, you can use the Response class:

```
$response = new \IoDigital\PeachPayment\Api\Response();
$response->isSuccessfulResponse($resultCode); // true|false
$response->isValidationError($resultCode); // true|false
```

Saving the response is also available: `$response->save($result, $paymentCard);`

### Webhooks

[](#webhooks)

The following change needs to be made in your `app/Http/Middleware/VerifyCsrfToken.php` file:

```
protected $except = [
        config('peachpayment.webhook_url')
    ];
```

### Helpers

[](#helpers)

#### Setting.php

[](#settingphp)

This class allows you to inject or modify your Peach Payment credentials on a per usage basis. By default, it uses the variables given in the config file and you only have to override the variables needed.

Usage is fairly straightforward:

```
$settings = new Setting();
$settings->setUser('lorem')
         ->setPassword('ipsum')
         ->setEntityIdOnceOff('dolor');

$pay = (PeachPayment())->initServerToServer($settings);
```

This should provide flexibility in certain edge cases.

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

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- \[author name\]\[link-author\]
- \[All Contributors\]\[link-contributors\]

License
-------

[](#license)

license. Please see the [license file](license.md) for more information.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 53.8% 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 ~65 days

Recently: every ~159 days

Total

11

Last Release

1564d ago

Major Versions

0.0.10 → 1.0.02022-01-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/0acb24b4d76853e47a3ad42fba61d9c623a7e0ea4d38e52ac134dd953174529b?d=identicon)[io-digital](/maintainers/io-digital)

---

Top Contributors

[![garethnic](https://avatars.githubusercontent.com/u/1523598?v=4)](https://github.com/garethnic "garethnic (7 commits)")[![rianzietsman](https://avatars.githubusercontent.com/u/140623410?v=4)](https://github.com/rianzietsman "rianzietsman (4 commits)")[![g0dReVeN](https://avatars.githubusercontent.com/u/42699212?v=4)](https://github.com/g0dReVeN "g0dReVeN (2 commits)")

---

Tags

laravelpaymentspeachlaravelPeachPayment

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/iodigital-peachpayment/health.svg)

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

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[luigel/laravel-paymongo

A laravel wrapper for Paymongo API

7956.2k1](/packages/luigel-laravel-paymongo)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[henryejemuta/laravel-monnify

A laravel package to seamlessly integrate monnify api within your laravel application

132.1k](/packages/henryejemuta-laravel-monnify)

PHPackages © 2026

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