paytrail/paytrail-php-sdk

PHP Software Development Kit for Paytrail payment service

2.7.3 2024-07-29 12:03 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

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.