PHPackages                             sapihost/paymentpage-sdk - 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. sapihost/paymentpage-sdk

ActiveLibrary[Payment Processing](/categories/payments)

sapihost/paymentpage-sdk
========================

SapiHost PHP SDK

1.0.0(2y ago)03MITPHP

Since Mar 29Pushed 2y ago1 watchersCompare

[ Source](https://github.com/silvercods/paymentpage-sdk-php)[ Packagist](https://packagist.org/packages/sapihost/paymentpage-sdk)[ RSS](/packages/sapihost-paymentpage-sdk/feed)WikiDiscussions master Synced 1mo ago

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

SapiHost PHP SDK
================

[](#sapihost-php-sdk)

[![Build Status](https://camo.githubusercontent.com/4b01a6f74637d9870594cbb5bd1d90bada3c9f45d8be63c87b48a92c5e2131f2/68747470733a2f2f7472617669732d63692e636f6d2f73617069686f73742f7061796d656e74706167652d73646b2d7068702e7376673f6272616e63683d6d61696e)](https://travis-ci.com/sapihost/paymentpage-sdk-php)

This is a set of libraries in the PHP language to ease integration of your service with the SapiHost Payment Page.

Please note that for correct SDK operating you must have at least PHP 7.0.

Payment flow
------------

[](#payment-flow)

[![Payment flow](flow.png)](flow.png)

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

[](#installation)

Install with composer

```
composer require sapihost/paymentpage-sdk
```

### Get URL for payment

[](#get-url-for-payment)

```
$gate = new sapihost\Gate('secret');
$payment = new sapihost\Payment('11', 'some payment id');
$payment->setPaymentAmount(1000)->setPaymentCurrency('RUB');
$url = $gate->getPurchasePaymentPageUrl($payment);
```

`$url` here is the signed URL.

If you want to use another domain for URL you can change it with optional `Gate` constructor parameter:

```
new sapihost\Gate('secret', 'https://mydomain.com/payment');
```

or change it with method

```
$gate->setPaymentBaseUrl('https://mydomain.com/payment');
```

### Handle callback from SapiHost

[](#handle-callback-from-sapihost)

You'll need to autoload this code in order to handle notifications:

```
$gate = new sapihost\Gate('secret');
$callback = $gate->handleCallback($data);
```

`$data` is the JSON data received from payment system;

`$callback` is the Callback object describing properties received from payment system; `$callback` implements these methods:

1. `Callback::getPaymentStatus();`Get payment status.
2. `Callback::getPayment();`Get all payment data.
3. `Callback::getPaymentId();`Get payment ID in your system.

### TODO

[](#todo)

- Payment Page opening
- Notifications handling
- Direct Gate requests
- PHPDoc

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

780d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/sapihost-paymentpage-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/sapihost-paymentpage-sdk/health.svg)](https://phpackages.com/packages/sapihost-paymentpage-sdk)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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