Download the PHP package markette/gopay-simple without Composer
On this page you can find all versions of the php package markette/gopay-simple. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package gopay-simple
Website 🚀 contributte.org | Contact 👨🏻💻 f3l1x.io | Twitter 🐦 @contributte
Disclaimer
| :warning: | This project is no longer being maintained. Please use contributte/gopay-inline. |
|---|
| Composer | markette/gopay-simple |
|---|---|
| Version | |
| PHP | |
| License |
Documentation
Goal
One class rule-them-all, best way is $gopay->call().
Install
Requirements
You need GoID, ClientID and ClientSecret.
- Webpage (https://www.gopaygate.com)
- Offical resources in EN (https://doc.gopay.com/en/)
- Offical resources in CZ (https://doc.gopay.com/cs/)
Usage
This super simple class provides a few methods, 2 public and 4 protected, for easy extending / prototyping.
Public
call(string $method, string $endpoint, array $args = []):stdClasssetMode(int $gopay::DEV/PROD):void$useragent:PHP+Markette/GopaySimple/{VERSION}$options:[](cURL options)
Protected
authenticate(array $args):stdClass(token)makeRequest(string $method, string $endpoint, array $args = []):stringgetEndpoint(string $type):stringgetEndpointUrl(string $uri):string
Common part
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
POST+payments/payment
GET+payments/payment/{id}
Best practice
You should inject GopaySimple into your service layer. And configure $args before creating payment for target.
Example of GopayService.
Testing
- Start build-in server at
tests/buildin/run.sh - Run tester at
tests/tester
Development
This package was maintained by these authors.
Consider to support contributte development team. Also thank you for using this package.
All versions of gopay-simple with dependencies
ext-curl Version *