pinvandaag/tms-ccv-api-php

A PHP wrapper for the CCV - Estate Management - Terminal Management API

Maintainers

Package info

github.com/Pin-Voordeel-Bv/tms-ccv-api-php

pkg:composer/pinvandaag/tms-ccv-api-php

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.0.1 2026-06-12 14:14 UTC

This package is not auto-updated.

Last update: 2026-06-13 12:29:23 UTC


README

A PHP Wrapper for the CCV - Estate Management - Terminal Management

Installation

composer require pinvandaag/tms-ccv-api-php

Small usage example

<?php

use Dotenv\Dotenv;
use PinVandaag\BuckarooAPI\TmsCcvAPIClient;

final class BuckarooController
{
    private TmsCcvAPIClient $apiClient;

    public function __construct()
    {
        $dotenv = Dotenv::createImmutable(__DIR__ . "/../../../../");
        $dotenv->safeLoad();
        $dotenv->required(['TMS_CCV_API_KEY'])->notEmpty();

        $this->apiClient = (new TmsCcvAPIClient())
            ->configure(
                apiKey: $_ENV['TMS_CCV_API_KEY'],
                baseUri: 'https://tms-demo-ccvdev.eu/api'
            );
    }

    public function getTerminal()
    {
        $tmsGateway = $_GET['tmsGateway'] ?? null;

        if ($tmsGateway === null || $tmsGateway === '') {
            throw new \RuntimeException('Missing tmsGateway.');
        }

        $terminalId = $_GET['terminalId'] ?? null;

        if ($terminalId === null || $terminalId === '') {
            throw new \RuntimeException('Missing terminalId.');
        }

        $result = $this->apiClient->getTerminal(
            tmsGateway: $tmsGateway,
            terminalId: $terminalId
        );

        $this->jsonResponse([
            'data' => $result,
        ]);
    }
}