Download the PHP package znojil/comgate without Composer

On this page you can find all versions of the php package znojil/comgate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package comgate

Znojil Comgate

Latest Stable Version PHP Version Require Tests

A simple and modern PHP library for communicating with the Comgate payment gateway API.

🚀 Installation

📖 Usage

1. Client Initialization

2. Creating a Payment

If you prefer to redirect the customer directly to the payment gateway:

3. Checking Payment Status

4. Using a Custom HTTP Client

You can inject your own HTTP client implementation by passing it as the second argument to the Client constructor. Your client must implement the Znojil\Comgate\Http\Client interface.

Your implementation must honor the Znojil\Comgate\Http\Option::* keys passed in $options (e.g. Option::FollowRedirects — some requests rely on redirects not being followed automatically) and must reject unknown string keys with an exception. Integer keys are raw CURLOPT_* constants — non-cURL implementations must reject them with an exception rather than silently ignore them, so that a consumer never ends up with options that silently don't apply.

5. Handling Push Notifications

Comgate sends a push notification (HTTP POST) to your server when a payment status changes. Use Client::accept() to authenticate and process it:

accept() automatically validates the merchant and secret from the request body against your Config. If they do not match, an InvalidArgumentException is thrown.

You can also inject a PSR-7 ServerRequestInterface manually — useful in frameworks that provide it:

⚠️ Error Handling

The client throws exceptions to help you identify the issue:

All exceptions thrown by the library implement the Znojil\Comgate\Exception\Exception marker interface, so a single catch can cover them all.

📄 License

This library is open-source software licensed under the MIT license.


All versions of comgate with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
znojil/http Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package znojil/comgate contains the following files

Loading the files please wait ...