PHPackages                             markette/gopay-simple - 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. markette/gopay-simple

AbandonedArchivedLibrary[API Development](/categories/api)

markette/gopay-simple
=====================

GoPay Inline Simple Payment Gateway

v1.0(10y ago)144.3k1New BSDPHPPHP &gt;=5.6CI failing

Since Apr 3Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/contributte/gopay-simple)[ Packagist](https://packagist.org/packages/markette/gopay-simple)[ Docs](https://github.com/Markette/GopaySimple)[ RSS](/packages/markette-gopay-simple/feed)WikiDiscussions master Synced 4w ago

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

[![](https://camo.githubusercontent.com/b032b28209deff494e6af8053b578804acbccdfc9975f005d6bb2ec2e8a97002/68747470733a2f2f686561746261646765722e76657263656c2e6170702f6769746875622f726561646d652f636f6e74726962757474652f676f7061792d73696d706c652f3f646570726563617465643d31)](https://camo.githubusercontent.com/b032b28209deff494e6af8053b578804acbccdfc9975f005d6bb2ec2e8a97002/68747470733a2f2f686561746261646765722e76657263656c2e6170702f6769746875622f726561646d652f636f6e74726962757474652f676f7061792d73696d706c652f3f646570726563617465643d31)

 [![](https://camo.githubusercontent.com/a8b1cd856d7d396fdebbe46947cc3507490acc267a02361e5e53bb7b820c95c3/68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f6769747465722f6379616e)](https://bit.ly/ctteg) [![](https://camo.githubusercontent.com/86d6416fc04f8bcc3daa7bf881526b9953b9726b1164d05c157c8713e3a73418/68747470733a2f2f62616467656e2e6e65742f62616467652f737570706f72742f666f72756d2f79656c6c6f77)](https://bit.ly/cttfo) [![](https://camo.githubusercontent.com/5d170ab94e6d594609561e16fe0f9e4293968fbd4dfcfafc5e11efc1415ef09c/68747470733a2f2f62616467656e2e6e65742f62616467652f73706f6e736f722f646f6e6174696f6e732f463936383534)](https://contributte.org/partners.html)

 Website 🚀 [contributte.org](https://contributte.org) | Contact 👨🏻‍💻 [f3l1x.io](https://f3l1x.io) | Twitter 🐦 [@contributte](https://twitter.com/contributte)

Disclaimer
----------

[](#disclaimer)

⚠️This project is no longer being maintained. Please use [contributte/gopay-inline](https://github.com/contributte/gopay-inline).Composer[`markette/gopay-simple`](https://packagist.org/packages/markette/gopay-simple)Version[![](https://camo.githubusercontent.com/6a98d2e71f032fa94ea462e9cdf950a2d2ff694b3c35ccf99eaee2434b74aab0/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f762f6d61726b657474652f676f7061792d73696d706c65)](https://camo.githubusercontent.com/6a98d2e71f032fa94ea462e9cdf950a2d2ff694b3c35ccf99eaee2434b74aab0/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f762f6d61726b657474652f676f7061792d73696d706c65)PHP[![](https://camo.githubusercontent.com/d27c2cfa5fa68c8bc6ddda64c4beafed80a4618e05a1598a42b8def134325764/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f7068702f6d61726b657474652f676f7061792d73696d706c65)](https://camo.githubusercontent.com/d27c2cfa5fa68c8bc6ddda64c4beafed80a4618e05a1598a42b8def134325764/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f7068702f6d61726b657474652f676f7061792d73696d706c65)License[![](https://camo.githubusercontent.com/a40cc194a8430fbaf84a4ee8ff81c14b0d3df8e571c9796f146b7fbfb5541af6/68747470733a2f2f62616467656e2e6e65742f6769746875622f6c6963656e73652f636f6e74726962757474652f676f7061792d73696d706c65)](https://camo.githubusercontent.com/a40cc194a8430fbaf84a4ee8ff81c14b0d3df8e571c9796f146b7fbfb5541af6/68747470733a2f2f62616467656e2e6e65742f6769746875622f6c6963656e73652f636f6e74726962757474652f676f7061792d73696d706c65)Documentation
-------------

[](#documentation)

### Goal

[](#goal)

One class rule-them-all, best way is `$gopay->call()`.

### Install

[](#install)

```
composer require markette/gopay-simple
```

### Requirements

[](#requirements)

You need **GoID**, **ClientID** and **ClientSecret**.

- Webpage ()
- Offical resources in EN ()
- Offical resources in CZ ()

### Usage

[](#usage)

This super simple class provides a few methods, 2 public and 4 protected, for easy extending / prototyping.

#### Public

[](#public)

- `call(string $method, string $endpoint, array $args = [])` : `stdClass`
- `setMode(int $gopay::DEV/PROD)` : `void`
- `$useragent` : `PHP+Markette/GopaySimple/{VERSION}`
- `$options` : `[]` (cURL options)

#### Protected

[](#protected)

- `authenticate(array $args)` : `stdClass` (token)
- `makeRequest(string $method, string $endpoint, array $args = [])` : `string`
- `getEndpoint(string $type)` : `string`
- `getEndpointUrl(string $uri)` : `string`

#### Common part

[](#common-part)

```
use Markette\GopaySimple\GopaySimple;

$gopay = new GopaySimple($clientId, $clientSecret);

# For testing purpose
$gopay->setMode($gopay::DEV);
```

#### Authorization (Oauth)

[](#authorization-oauth)

Auth process is very simple and automatic. So, you do not have to do anything.

If you really need override authorization, you have to extend `GopaySimple` and call `authenticate($args)` directly.

#### Payments

[](#payments)

##### `POST+payments/payment`

[](#postpaymentspayment)

```
$response = $gopay->call('POST', 'payments/payment', [
	'payer' => [
		'default_payment_instrument' => 'BANK_ACCOUNT',
		'allowed_payment_instruments' => ['BANK_ACCOUNT'],
		'default_swift' => 'FIOBCZPP',
		'allowed_swifts' => ['FIOBCZPP', 'BREXCZPP'],
		'contact' => [
			'first_name' => 'Zbynek',
			'last_name' => 'Zak',
			'email' => 'zbynek.zak@gopay.cz',
			'phone_number' => '+420777456123',
			'city' => 'C.Budejovice',
			'street' => 'Plana 67',
			'postal_code' => '373 01',
			'country_code' => 'CZE',
		],
	],
	'target': ['type' => 'ACCOUNT', 'goid' => '_YOUR_GO_ID_',
	'amount' => 150,
	'currency' => 'CZK',
	'order_number' => '001',
	'order_description' => 'pojisteni01',
	'items' => [
		['name' => 'item01', 'amount' => 50],
		['name' => 'item02', 'amount' => 100],
	],
	'additional_params' => [
		array('name' => 'invoicenumber', 'value' => '20160001')
	],
	'return_url' => 'http://www.your-url.tld/return',
	'notify_url' => 'http://www.your-url.tld/notify',
	'lang' => 'cs',
]);
```

##### `GET+payments/payment/{id}`

[](#getpaymentspaymentid)

```
$response = $gopay->call('GET', 'payments/payment/{id}');
```

#### Best practice

[](#best-practice)

You should inject `GopaySimple` into your service layer. And configure `$args` before creating payment for **target**.

Example of [GopayService](https://github.com/Markette/GopaySimple/blob/master/examples/GopayService.php).

### Testing

[](#testing)

1. Start build-in server at `tests/buildin/run.sh`
2. Run tester at `tests/tester`

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

[](#development)

This package was maintained by these authors.

[ ![](https://avatars2.githubusercontent.com/u/538058?v=3&s=80)](https://github.com/f3l1x)---

Consider to [support](https://contributte.org/partners.html) **contributte** development team. Also thank you for using this package.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance46

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.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

Unknown

Total

1

Last Release

3739d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/538058?v=4)[Milan Šulc](/maintainers/f3l1x)[@f3l1x](https://github.com/f3l1x)

---

Top Contributors

[![f3l1x](https://avatars.githubusercontent.com/u/538058?v=4)](https://github.com/f3l1x "f3l1x (14 commits)")[![petrparolek](https://avatars.githubusercontent.com/u/6066243?v=4)](https://github.com/petrparolek "petrparolek (4 commits)")

---

Tags

apicontributteecommercegopaymarkettenette-frameworkpaymentsphpapiSimplepaymentinlineeshopgopay

### Embed Badge

![Health badge](/badges/markette-gopay-simple/health.svg)

```
[![Health](https://phpackages.com/badges/markette-gopay-simple/health.svg)](https://phpackages.com/packages/markette-gopay-simple)
```

###  Alternatives

[markette/gopay-inline

GoPay Inline Payment Gateway

32231.5k1](/packages/markette-gopay-inline)[everypay/everypay-php

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

PHPackages © 2026

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