PHPackages                             adamstipak/webpay-php - 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. adamstipak/webpay-php

ActiveLibrary[API Development](/categories/api)

adamstipak/webpay-php
=====================

GP Webpay API Wrapper

1.5.1(2y ago)45167.3k↓14.5%45[1 PRs](https://github.com/newPOPE/gp-webpay-php-sdk/pulls)MITPHPPHP ~7.4 || ~8.0

Since Aug 13Pushed 1y ago6 watchersCompare

[ Source](https://github.com/newPOPE/gp-webpay-php-sdk)[ Packagist](https://packagist.org/packages/adamstipak/webpay-php)[ Docs](https://github.com/newPOPE/webpay-php)[ RSS](/packages/adamstipak-webpay-php/feed)WikiDiscussions master Synced 1mo ago

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

GP Webpay PHP SDK
=================

[](#gp-webpay-php-sdk)

[![Build Status](https://camo.githubusercontent.com/f2b968fe05b325a223e1e2a105867732672f83961305747ce8b6cba463159883/68747470733a2f2f7472617669732d63692e6f72672f6e6577504f50452f67702d7765627061792d7068702d73646b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/newPOPE/gp-webpay-php-sdk)

Full featured PHP SDK for [GP Webpay payments](http://www.gpwebpay.cz).

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

[](#installation)

The best way to install GP Webpay PHP SDK is using [Composer](http://getcomposer.org/):

```
$ composer require adamstipak/webpay-php dev-master
```

Setup
-----

[](#setup)

```
$signer = new \AdamStipak\Webpay\Signer(
  $privateKeyFilepath,    // Path of private key.
  $privateKeyPassword,    // Password for private key.
  $publicKeyFilepath      // Path of public key.
);

$api = new \AdamStipak\Webpay\Api(
  $merchantNumber,    // Merchant number.
  $webpayUrl,         // URL of webpay.
  $signer             // instance of \AdamStipak\Webpay\Signer.
);
```

Create payment
--------------

[](#create-payment)

### Create payment url

[](#create-payment-url)

```
use \AdamStipak\Webpay\PaymentRequest;

$request = new PaymentRequest(...);

$url = $api->createPaymentRequestUrl($request); // $api instance of \AdamStipak\Webpay\Api

// use $url as you want. In most cases for redirecting to GP Webpay.
```

#### ADDINFO parameter

[](#addinfo-parameter)

```
// for minimal setup you can use
use \AdamStipak\Webpay\PaymentRequest;
use AdamStipak\Webpay\PaymentRequest\AddInfo;

$schema = file_get_contents("Path to XSD schema (GPwebpayAdditionalInfoRequest_v.4.xsd) from portal https://portal.gpwebpay.com/");
// use minimal valid values for XSD schema
$addInfo = new AddInfo($schema, AddInfo::createMinimalValues());
// or you can use valid values against XSD schema (start here AddInfo::createMinimalValues())
$request = new AddInfo($schema, [...]);

$request = new PaymentRequest(..., $addInfo);
```

### Verify payment response

[](#verify-payment-response)

```
use \AdamStipak\Webpay\PaymentResponse;
use \AdamStipak\Webpay\Exception;

$response = new PaymentResponse(...); // fill response with response parameters (from request).

try {
  $api->verifyPaymentResponse($response);
}
catch (PaymentResponseException $e) {
  // PaymentResponseException has $prCode, $srCode for properties for logging GP Webpay response error codes.
}
catch (Exception $e) {
  // Digest is not correct.
}
```

Development
-----------

[](#development)

GP Webpay PHP SDK is developed in [Docker](https://docker.com) container via `docker-compose` command.

Example:

```
$ docker-compose run --rm default install  # install deps via composer
$ docker-compose run --rm default  # runs tests in container
```

Attach to container:

```
$ docker-compose run --rm default bash # runs bash in container and attach tty
```

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity48

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 72.5% 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 ~481 days

Recently: every ~207 days

Total

9

Last Release

808d ago

### Community

Maintainers

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

---

Top Contributors

[![newPOPE](https://avatars.githubusercontent.com/u/484382?v=4)](https://github.com/newPOPE "newPOPE (74 commits)")[![MartinVondrak](https://avatars.githubusercontent.com/u/22094256?v=4)](https://github.com/MartinVondrak "MartinVondrak (9 commits)")[![sebik](https://avatars.githubusercontent.com/u/873189?v=4)](https://github.com/sebik "sebik (4 commits)")[![Vitexus](https://avatars.githubusercontent.com/u/2621130?v=4)](https://github.com/Vitexus "Vitexus (3 commits)")[![pavol-tuka](https://avatars.githubusercontent.com/u/30590523?v=4)](https://github.com/pavol-tuka "pavol-tuka (3 commits)")[![dg](https://avatars.githubusercontent.com/u/194960?v=4)](https://github.com/dg "dg (3 commits)")[![rudolfbruder](https://avatars.githubusercontent.com/u/56951790?v=4)](https://github.com/rudolfbruder "rudolfbruder (2 commits)")[![wernerdweight](https://avatars.githubusercontent.com/u/2445436?v=4)](https://github.com/wernerdweight "wernerdweight (1 commits)")[![sajfi](https://avatars.githubusercontent.com/u/597035?v=4)](https://github.com/sajfi "sajfi (1 commits)")[![tomas-novotny](https://avatars.githubusercontent.com/u/36948723?v=4)](https://github.com/tomas-novotny "tomas-novotny (1 commits)")[![DevEidem](https://avatars.githubusercontent.com/u/36631357?v=4)](https://github.com/DevEidem "DevEidem (1 commits)")

---

Tags

phpwebpay

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/adamstipak-webpay-php/health.svg)

```
[![Health](https://phpackages.com/badges/adamstipak-webpay-php/health.svg)](https://phpackages.com/packages/adamstipak-webpay-php)
```

###  Alternatives

[kiwilan/php-opds

PHP package to create OPDS feed for eBooks.

104.9k1](/packages/kiwilan-php-opds)

PHPackages © 2026

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