paytrail / paytrail-php-sdk
PHP Software Development Kit for Paytrail payment service
Installs: 217 735
Dependents: 3
Suggesters: 0
Security: 0
Stars: 7
Watchers: 9
Forks: 13
Open Issues: 1
Requires
- php: >=7.3
- ext-curl: *
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- guzzlehttp/guzzle: ^7.0|^6.0
- mockery/mockery: ^1.5
- phpcompatibility/php-compatibility: ^9.3
- phpmd/phpmd: ^2.10
- phpstan/phpstan: 1.9.14
- phpunit/phpunit: ^10.0 || ^9.0
- squizlabs/php_codesniffer: ^3.6
This package is auto-updated.
Last update: 2024-10-29 12:39:01 UTC
README
PHP Software Development Kit for Paytrail payment service
Paytrail Payment Service
Paytrail is a payment gateway that offers 20+ payment methods for Finnish customers.
The payment gateway provides all the popular payment methods with one simple integration. The provided payment methods include, but are not limited to, credit cards, online banking and mobile payments.
To use the payment service, you need to sign up for a Paytrail account. Transaction fees will be charged for every transaction. Transaction cost may vary from merchant to merchant, based on what is agreed upon with Paytrail when negotiating your contract. For more information and registration, please visit our website or contact asiakaspalvelu@paytrail.com directly.
Requirements
General requirements
- PHP version >= 7.3
- ext-curl PHP cURL extension
- ext-json PHP JSON extension
Development requirements
- PHPUnit - A programmer-oriented testing framework for running unit tests in PHP.
- Guzzle 7 or 6 - PHP HTTP client for performing HTTP request.
Guzzle
PHP-SDK will use Guzzle 6 or 7, if in present application, otherwise it will fall back to cURL. Guzzle is still used as dev dependency to make testing easier.
Using Guzzle is recommended on applications using PHP-SDK.
Installation
Install with Composer:
composer require paytrail/paytrail-php-sdk
The package uses PSR-4 autoloader. Activate autoloading by requiring the Composer autoloader:
require 'vendor/autoload.php';
Note the path to the vendor directory is relative to your project.
Folder contents & descriptions
Basic functionalities
The Paytrail PHP-SDK supports most of the functionalities of the Paytrail Payment API.
Some of the key features are:
Payments and refunds
Tokenized credit cards and payments
- Creating Add card form request
- Creating Get token request
- Creating Customer Initiated Transactions (CIT) or Merchant Initiated Transactions (MIT)
Shop-in-Shop
- Creating Shop-in-Shop payment request
Settlements
Reports
Methods
List of Client::class
methods
Disclaimer: This open source project is made available to assist coders in getting started with our API. However, we do not provide any warranty or guarantee that the code will work as intended and offer limited support for it. Use at your own risk.