Download the PHP package scanpay/scanpay without Composer
On this page you can find all versions of the php package scanpay/scanpay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download scanpay/scanpay
More information about scanpay/scanpay
Files in scanpay/scanpay
Package scanpay
Short Description PHP client for the Scanpay API
License MIT
Homepage https://scanpay.dk
Informations about the package scanpay
Scanpay PHP client
The Scanpay PHP client library provides convenient and simplified access to the Scanpay API from programs written in PHP. The library is developed and maintained by Scanpay in Denmark.
If you have any questions, concerns or ideas, please do not hesitate to e-mail us at chat.scanpay.dev.
Requirements
PHP version >= 7.4 with php-curl (libcurl >= 7.60.0). See compatibility table.
Installation
The package is published at Packagist. You can install the library via Composer:
You can then include it in your project with:
Manual installation
If you do not wish to use Composer, you can download the latest release and include it in your project:
Usage
The API documentation is available here. Most methods accept an optional per-request array with options, referred to as $options
.
newURL(Array, $options): String
Create a link to our hosted payment window (docs | example).
seq(Integer, $options): Array
Fetch changes after a specified sequence number (docs | example).
parsePing(String, String): Array
Validate and parse scanpay pings (docs | example).
capture(Integer, Array, $options): Array
Capture an authorized amount from a transaction (docs | example).
The index
is the number of actions recorded by your system, and it's a security measure against double captures.
charge(Integer, Array, $options): Array
Charge a subscriber (docs | example).
renew(Integer, Array, $options): String
Create a link to renew the payment method for a subscriber. (docs | example).
Options
All methods, except parsePing
, accept an optional per-request $options
array. You can use this to:
- Set HTTP headers, e.g. the highly recommended
X-Cardholder-IP
(example) - Override API key (example)
- Change the hostname to use our test environment
api.scanpay.dev
(example) - Enable debugging mode (example)
- Override cURL options with
CURLOPT_*
parameters (example).
Compatibility table
PHP | Version |
---|---|
8.0 | |
Typed class properties | 7.4 |
Type declarations | 7.4 |
Null coalescing operator | 7.4 |
hash_equals | 5.6 |
curl_strerror | 5.5 |
License
Everything in this repository is licensed under the MIT license.
All versions of scanpay with dependencies
ext-curl Version *