PHPackages                             alsharie/cashpay-payment - 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. alsharie/cashpay-payment

ActiveLibrary[Payment Processing](/categories/payments)

alsharie/cashpay-payment
========================

CashPay payment gateway

1.2.1(2y ago)121339MITPHPPHP &gt;=7.4

Since May 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Alsharie/cash-payment)[ Packagist](https://packagist.org/packages/alsharie/cashpay-payment)[ RSS](/packages/alsharie-cashpay-payment/feed)WikiDiscussions master Synced 1mo ago

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

CashPay-payment
===============

[](#cashpay-payment)

[![img.png](img.png)](img.png)

laravel package for CashPay payment getway install the package `composer require alsharie/cashpay-payment`

You can publish using the following command

`php artisan vendor:publish --provider="Alsharie\CashPayPayment\CashPayServiceProvider"`

When published, the `config/cashPay.php` config file contains:

```
return [
    'auth' => [
        'UserName' => env('CASHPAY_MERCHANT_USERNAME'),
        'SpId' => env('CASHPAY_MERCHANT_SPID'),
        'encPassword' => env('CASHPAY_MERCHANT_ENCPASSWORD'),
    ],
    'cert' => [
        'path' => env('CASHPAY_CERT_PATH'),
        'password' => env('CASHPAY_CERT_PASSWORD'),
    ],
    'url' => [
        'base' => env('CASHPAY_BASE_URL', 'https://www.tamkeen.com.ye:33291/CashPG'),
    ]
];
```

when you are ready to release your application, you should set the `CASHPAY_BASE_URL` to *release-url*and they give you a certificate file and password to use it in `CASHPAY_CERT_PATH` and `CASHPAY_CERT_PASSWORD` respectively

To purchase using CashPay payment

### 1. Purchase

[](#1-purchase)

```
 $cashPay = new CashPay();
 $response = $cashPay
    ->setRequestId(/*request id*/) //Request unique identifier that should be generated by sp
    ->setCustomerPhone(/*phone */) // TargetMSISDN
    ->setCustomerCashPayCode(/*code*/)
    ->setAmount(/*amount*/)
    ->setCurrency(2)
    ->setDescription(/*desc*/)
    ->initPayment();

 if ($response->isSuccess()) {
    $tran_ref = $response->getTransactionRef();
    ....
    ....
 }

```

### 2. Confirm purchase

[](#2-confirm-purchase)

```
 $cashPay = new CashPay();
$response = $cashPay
    ->setRequestId(/*request id*/) //Request unique identifier that should be generated by sp
    ->setOtp(/*otp */) // customer otp
    ->setTransactionRef(/*tran ref*/) //Transaction Code returned in InitPayment response
    ->confirmPayment();

 if ($response->isSuccess()) {
    $code = $response->code();
    ....
    ....
 }

```

you can get the full **response body** using `$response->body()` for all requests

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity47

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 ~101 days

Total

4

Last Release

786d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ea1e02a853f19eb13769c87ef731c4988ffd8fece015761090e63717a8cdb06d?d=identicon)[alsharie](/maintainers/alsharie)

---

Top Contributors

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

---

Tags

cashcashpaypaymenttamkeenyemen

### Embed Badge

![Health badge](/badges/alsharie-cashpay-payment/health.svg)

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

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[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)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[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)
