PHP code example of vatcompliance / vatcompliance

1. Go to this page and download the library: Download vatcompliance/vatcompliance 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/ */

    

vatcompliance / vatcompliance example snippets




$omp = new Merchant('__ACCESS KEY__');

$result = $omp->merchantSend(
	array(
		'transaction_id' =>'213321829137291739231321',
		'transaction_datetime' => date('Y-m-d'),
		'transaction_sum' => 25,
		'currency' => 'EUR',
		'customer_ip' => '127.0.0.1',
		"arrival_country" => " GBR",
		"arrival_city" => " London",
		"arrival_address_line" => " Peckham Road",
		"transaction_status" => "Success",
		'customer_phone_number' => '+48 *** *** ***',
		'getParams' => array(
			'if_digital' => 'true',
			'if_vat_calculate' => 'true'
		)
	)
);

	'getParams' => array(
		'if_digital' => 'true/false',
		'if_vat_calculate' => 'true/false'
	)