1. Go to this page and download the library: Download digitsrl/php-wom-connector 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/ */
digitsrl / php-wom-connector example snippets
date_default_timezone_set("UTC");
\WOM\Logger::Initialize(array(
new \Monolog\Handler\StreamHandler('php://stdout', \Monolog\Logger::DEBUG)
));
\WOM\Config\Domain::SetDomain('dev.wom.social');
$instrument = new \WOM\Instrument(
INSTRUMENT_ID,
INSTRUMENT_PRIVATE_KEY,
INSTRUMENT_PRIVATE_KEY_PASSWORD
);
$vouchers[] = \WOM\Voucher::Create('H', 40.12319, 12.83548, new DateTime('NOW'));
$vouchers[] = \WOM\Voucher::Create('H', 40.12319, 12.83548, new DateTime('NOW'), 100);
$values = $POS->RequestPayment(
100, // Number of WOM vouchers ation URL, will be opened by Pocket on payment completion, can be null if Pocket should only display payment confirmation on screen
$filter, // Filter that determines which vouchers are accepted
'https://myserver.io/backend/confirm', // Optional Registry confirmation URL, which receives a webhook request from the Registry on payment completion, can be null
null // Optional boolean indicating whether this is a persistent payment (can be performed multiple times) or not
);
$otc = $values['otc'];
$pin = $values['password'];
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.