ingenico / direct-sdk-php
PHP SDK to communicate with the payment platform server-to-server API
Installs: 72 093
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 11
Forks: 5
Open Issues: 4
Requires
- php: >=7.4
- robtimus/multipart: ^1.0
Requires (Dev)
- phpstan/phpstan: ^1.9
- phpunit/phpunit: ^9.0
- dev-master
- 5.17.0
- 5.16.1
- 5.16.0
- 5.15.0
- 5.14.0
- 5.13.0
- 5.12.0
- 5.11.0
- 5.10.0
- 5.9.0
- 5.8.2
- 5.8.0
- 5.7.0
- 5.6.0
- 5.5.0
- 5.4.0
- 5.3.0
- 5.2.1
- 5.2.0
- 5.1.0
- 5.0.0
- 4.6.0
- 4.5.0
- 4.4.0
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.0
- 3.5.0
- 3.4.0
- 3.3.0
- 3.2.1
- 3.2.0
- 3.1.0
- 3.0.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.2.0
- 1.1.0
- 1.0.0
This package is auto-updated.
Last update: 2024-10-21 20:12:08 UTC
README
Introduction
The PHP SDK helps you to communicate with the payment platform server API. Its primary features are:
- convenient PHP wrapper around the API calls and responses:
- marshalls PHP request objects to HTTP requests
- unmarshalls HTTP responses to PHP response objects or PHP exceptions
- handling of all the details concerning authentication
- handling of required meta data
Its use is demonstrated by an example for most calls. The examples execute a call using the provided API keys.
Structure of this repository
This repository consists out of the following components:
- The source code of the SDK itself:
/src
and/lib
- The source code of the unit and integration tests (including the examples):
/tests
Requirements
PHP 7.4 or above is required.
Installation via Composer
-
Initialize Composer in your project, if this is not already done, by executing the following command:
composer init
-
Add a requirement to the SDK to your
composer.json
file by executing the following command:composer require wl-online-payments-direct/sdk-php
-
Add
vendor/autoload.php
to your project, if this is not already done, by adding the following line of code:require __DIR__ . '/vendor/autoload.php';
Manual installation
- Download the latest version of the PHP SDK from GitHub. Choose the
onlinepayments-sdk-php-x.y.z.tar.gz
file from the releases page, wherex.y.z
is the version number. - Add the contents of the
tar.gz
file to your project. The content of the/src
and/lib
folders may be combined, if this is required by the project. - Add all classes from the
/src
and/lib
folders to your autoloader; all classes inside these folders are compliant with PSR-4.
Development and testing
- Install Composer
- From the root of the sdk-php project, run
composer install
- Copy
tests/config.json.dist
totests/config.json
and replace the template values by actual values - From the root of the sdk-php project,
vendor/phpunit/phpunit/phpunit
(or justphpunit
when it is already installed on your local machine)