PHP code example of vtcpay / soap-client

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

    

vtcpay / soap-client example snippets


$builder = new \Vtcpay\SoapClient\ClientBuilder(
  '/path/to/your/vtcpay/wsdl/sandbox.enterprise.wsdl.xml'
);

$client = $builder->build();

$log = new \Monolog\Logger('vtcpay');  
$log->pushHandler(new \Monolog\Handler\StreamHandler('/path/to/your.log'));

$builder = new \Vtcpay\SoapClient\ClientBuilder(
  '/path/to/your/vtcpay/wsdl/sandbox.enterprise.wsdl.xml'
);
$client = $builder->withLog($log)
  ->build();
bash
$ php composer.phar