paynl / unifiedqr
Library to encode and decode payment UUID
Installs: 3 397
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 8
Forks: 1
Open Issues: 0
This package is auto-updated.
Last update: 2024-10-06 15:16:14 UTC
README
Library to encode and decode payment UUID
Installation
This library uses composer.
Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.
For more information on how to use/install composer, please visit: https://github.com/composer/composer
To install the Pay.nl PHP sdk into your project, simply
$ composer require paynl/unifiedQR
Quick start and examples
Encode dynamic QR
require __DIR__ . '/vendor/autoload.php'; $UUID = \Paynl\QR\UUID::encode(\Paynl\QR\UUID::QR_TYPE_DYNAMIC, [ 'serviceId' => 'SL-1234-5678', 'secret' => '0e8debc04c0dce170a1de4205053bd3ed6fd132f', 'reference' => '0123456', 'referenceType' => \Paynl\QR\UUID::REFERENCE_TYPE_STRING ]); var_dump($UUID);
Decode dynamic QR
require __DIR__ . '/vendor/autoload.php'; $UUID = \Paynl\QR\UUID::decode([ 'secret' => '0e8debc04c0dce170a1de4205053bd3ed6fd132f', 'uuid' => $UUID ]); var_dump($UUID);