PHPackages                             andy-am/laravel-gopay-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. andy-am/laravel-gopay-sdk

ActiveLibrary

andy-am/laravel-gopay-sdk
=========================

GoPay SDK integration with Laravel Framework

1.0.11(2y ago)013MITPHPPHP ^8.2

Since Nov 14Pushed 2y agoCompare

[ Source](https://github.com/andy-am/laravel-gopay-sdk)[ Packagist](https://packagist.org/packages/andy-am/laravel-gopay-sdk)[ RSS](/packages/andy-am-laravel-gopay-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (13)Used By (0)

Laravel GoPay SDK
=================

[](#laravel-gopay-sdk)

[![Build Status](https://camo.githubusercontent.com/97e05f95a0fe20d7266f3ba83f01cc1730e6ede9ebb2062bfd03e0756e24ee0e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f68617a6573747564696f2f6c61726176656c2d676f7061792d73646b2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/hazestudio/laravel-gopay-sdk/build-status/master) [![Scrutinizer](https://camo.githubusercontent.com/9ba1fba38caa77b3074f0b54e91ef72468ac527626f909c020f9d89ead7bbf79/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f68617a6573747564696f2f6c61726176656c2d676f7061792d73646b2e737667)](https://scrutinizer-ci.com/g/hazestudio/laravel-gopay-sdk/?branch=master) [![Latest Stable Version](https://camo.githubusercontent.com/cb6b9b03d18ce75d8d91c53ec7a436599f3ae736002541fa2f367f326c30ccd0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68617a6573747564696f2f6c61726176656c2d676f7061792d73646b2e737667)](https://packagist.org/packages/hazestudio/laravel-gopay-sdk) ![Total Downloads](https://camo.githubusercontent.com/9fe1fe74779c172c090316ba5c5e892c6a14973aa12bf1cd387248342def41f7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68617a6573747564696f2f6c61726176656c2d676f7061792d73646b2e737667) ![Packagist](https://camo.githubusercontent.com/2e381adc9805e49cfa5634a74daea02140a55ef23ee79e6de266ee5f2ee94dde/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f68617a6573747564696f2f6c61726176656c2d676f7061792d73646b2e7376673f7374796c653d706c6173746963)

### Docs

[](#docs)

- [Installation](#installation)
- [Configuration](#configuration)
- [Features](#features)
- [Examples](#examples)

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

[](#installation)

### Step 1: Install package

[](#step-1-install-package)

Add the package in your composer.json by executing the command.

```
composer require hazestudio/laravel-gopay-sdk
```

This will both update composer.json and install the package into the vendor/ directory.

Next, add the service provider and facade to `config/app.php`

Add the service provider to providers:

```
'providers' => [
    ...
    HazeStudio\LaravelGoPaySDK\GopayServiceProvider::class,
    ...
]

```

And add the facade to aliases:

```
'aliases' => [
    ...
    'GoPay' => HazeStudio\LaravelGoPaySDK\Facade::class,
    ...
]

```

### Step 2: Configuration

[](#step-2-configuration)

First initialise the config file by running this command:

```
php artisan vendor:publish
```

With this command, initialize the configuration and modify the created file, located under `config/gopay.php`.

Configuration
-------------

[](#configuration)

```
return [
    'goid' => 'YOUR_GOID',
    'clientId' => 'YOUR_CLIENT_ID',
    'clientSecret' => 'YOUR_CLIENT_SECRET',
    'defaultScope' => 'ALL', //GoPay\Definition\TokenScope Constants
    'languages' => [
        'en' => 'ENGLISH',
        'sk' => 'SLOVAK',
        'cs' => 'CZECH'
    ], //Map Laravel languages to GoPay\Definition\Language Constants
    'timeout' => 30
];
```

Features
--------

[](#features)

### Languages

[](#languages)

```
\GoPay::lang(GoPay\Definition\Languages::SLOVAK)
//or just
\GoPay::lang('sk')
//or
\GoPay::lang('SLOVAK')->createPayment(...);
```

### Scopes

[](#scopes)

```
\GoPay::scope(GoPay\Definition\TokenScope::ALL) //Override default scope
//or
\GoPay::scope('ALL')->createPayment(...);
```

### Events

[](#events)

**Name****Class**PaymentCreatedHazeStudio\\LaravelGoPaySDK\\Events\\PaymentCreatedExample:

```
Event::listen(\HazeStudio\LaravelGoPaySDK\Events\PaymentCreated::class, function ($event) {
    dd($event->payment);
});
```

Examples
--------

[](#examples)

### Create standard payment

[](#create-standard-payment)

```
use GoPay;
use GoPay\Definition\Payment\Currency;
use GoPay\Definition\Payment\PaymentInstrument;
use GoPay\Definition\Payment\BankSwiftCode;

//This will log every http request to the GoPay api
GoPay::log(function($request, $response){
    \PC::gp_request($request); //PHP Console package
    \PC::gp_response($response); //PHP Console package
    //Or Laravel Log
    \Log::info("{$request->method} {$request->url} -> {$response->statusCode}");
});

$user = \Auth::user();
$response = GoPay::lang($user->locale)->scope('CREATE_PAYMENT')->createPayment([
    'payer' => [
        'default_payment_instrument' => PaymentInstrument::BANK_ACCOUNT,
        'allowed_payment_instruments' => [PaymentInstrument::BANK_ACCOUNT],
        'default_swift' => BankSwiftCode::FIO_BANKA,
        'allowed_swifts' => [BankSwiftCode::FIO_BANKA, BankSwiftCode::MBANK],
        'contact' => [
            'first_name' => 'Zbynek',
            'last_name' => 'Zak',
            'email' => 'test@test.cz',
            'phone_number' => '+420777456123',
            'city' => 'C.Budejovice',
            'street' => 'Plana 67',
            'postal_code' => '373 01',
            'country_code' => 'CZE',
        ],
    ],
    'amount' => 1000,
    'currency' => Currency::CZECH_CROWNS,
    'order_number' => '001',
    'order_description' => 'pojisteni01',
    'items' => [
        ['name' => 'item01', 'amount' => 50],
        ['name' => 'item02', 'amount' => 100],
    ],
    'additional_params' => [
        array('name' => 'invoicenumber', 'value' => '2015001003')
    ],
    'callback' => [
        'return_url' => 'http://www.your-url.tld/return',
        'notification_url' => 'http://www.your-url.tld/notify'
    ]
]);

if ($response->hasSucceed()) {
    $url = $response->json['gw_url'];
    echo $response;
}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~0 days

Total

12

Last Release

813d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/12e54f8bf430227d666466d792e5480f95448cbbf67c7f657d6bf5970de5b04c?d=identicon)[7aduso7](/maintainers/7aduso7)

---

Top Contributors

[![andy-am](https://avatars.githubusercontent.com/u/2243693?v=4)](https://github.com/andy-am "andy-am (2 commits)")[![gardenerik](https://avatars.githubusercontent.com/u/11409143?v=4)](https://github.com/gardenerik "gardenerik (2 commits)")[![tominon](https://avatars.githubusercontent.com/u/508519?v=4)](https://github.com/tominon "tominon (1 commits)")[![tsandrini](https://avatars.githubusercontent.com/u/21975189?v=4)](https://github.com/tsandrini "tsandrini (1 commits)")

### Embed Badge

![Health badge](/badges/andy-am-laravel-gopay-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/andy-am-laravel-gopay-sdk/health.svg)](https://phpackages.com/packages/andy-am-laravel-gopay-sdk)
```

###  Alternatives

[genealabs/laravel-model-caching

Automatic caching for Eloquent models.

2.4k4.8M26](/packages/genealabs-laravel-model-caching)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.2M51](/packages/spatie-laravel-responsecache)[mikebronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k127.1k1](/packages/mikebronner-laravel-model-caching)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)

PHPackages © 2026

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