PHP code example of pinvandaag / pin-php-sdk
1. Go to this page and download the library: Download pinvandaag/pin-php-sdk library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pinvandaag / pin-php-sdk example snippets
use PinVandaag\Client;
use PinVandaag\Services\Transactions;
backup API
// $client->setBaseUrl("https://api-backup.pinvandaag.com");
$transactions = new Transactions($client);
// Create €0.01
$response = $transactions->createEuro(0.01);
$transactionId = $response['transaction_id'] ?? null;
if ($transactionId) {
$status = $transactions->status($transactionId);
if ($status['normalizedStatus'] === 'success') {
echo "Payment OK";
}
}
use PinVandaag\Client;
use PinVandaag\CTMP;
$client = new Client($apiKey, $terminalId);
$ctmp = new CTMP($client, 'Worldline');
$result = $ctmp->send();
if ($result['status'] === 'success') {
echo $result['message'];
} else {
echo $result['message'];
}