Download the PHP package trstd/cot-integration-library without Composer
On this page you can find all versions of the php package trstd/cot-integration-library. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download trstd/cot-integration-library
More information about trstd/cot-integration-library
Files in trstd/cot-integration-library
Package cot-integration-library
Short Description A PHP integration library for connecting to Community of Trust platform.
License MIT
Homepage https://github.com/trustedshops-public/cot-php-integration-library
Informations about the package cot-integration-library
Community of Trust PHP Integration Library
This library provides a comprehensive PHP interface for integrating with the Community of Trust (COT) platform, facilitating seamless interactions with its services.
Requirements
- PHP >= 7.4
- Composer for managing dependencies
Installation
To install the library, run the following command in your project directory:
Usage
Here is a basic example of how to use the library:
On the backend side:
On the frontend side, place the following code in your HTML file where you want the widget to appear:
For more detailed examples, please refer to the examples/ directory.
Development
Prerequisites
- PHP >= 7.4
- Composer
- Docker (optional, for containerized development)
Setup
-
Install dependencies:
-
Generate certificates (for HTTPS testing):
- Start development environment:
Configuration
-
Create configuration file:
- Update configuration with your credentials:
Development Commands
The project includes a comprehensive Makefile with the following commands:
🐳 Docker Environment
make dev- Start Docker with live file watchingmake docker-stop- Stop Docker environment
🔐 Certificates
make certs- Generate self-signed localhost TLS certs for HTTPS (8443)
Testing
The project includes a test environment for development and testing:
-
Start the test environment:
-
Access the test page:
- HTTPS (recommended): https://localhost:8443/oauth-integration-test.php
- HTTP (dev only): http://localhost:8081/oauth-integration-test.php
- Run automated tests:
Debugging
For debugging with Xdebug:
- Start Xdebug in your IDE first (Cursor, VS Code, PhpStorm)
-
Run development environment:
- Set breakpoints in your PHP code
- Visit test page: https://localhost:8443/oauth-integration-test.php
- Code will pause at breakpoints for inspection
Important: Always start Xdebug in IDE before running make dev. The environment will attach to your IDE's debugger on host.docker.internal:9003.
Contributing
Contributions are welcome! Please refer to the CONTRIBUTING.md file for guidelines.
License
This library is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- firebase/php-jwt for JWT handling
- phpseclib/phpseclib for security features
- monolog/monolog for logging
- symfony/http-client for HTTP client features
Versioning
This project adheres to Semantic Versioning. For the versions available, see the tags on this repository.
PHP Package Repository
This library is available on Packagist.
All versions of cot-integration-library with dependencies
firebase/php-jwt Version ^6
phpseclib/phpseclib Version ^3
monolog/monolog Version ^2
psr/cache Version ^1.0 || ^2.0
symfony/http-client Version ^5