PHP code example of sf4 / omnivabundle

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

    

sf4 / omnivabundle example snippets


$client = new \SoapClient('https://edixml.post.ee/epmx/services/messagesService.wsdl', array('login' => 'xxx', 'password' => 'xxx'));
/** @noinspection PhpUndefinedMethodInspection */
$request = $client->preSendMsg([
    'partner' => '24432',
    'interchange' => [
        'header' => [
            'file_id' => date('Ymd'),
            'sender_cd' => '24432'
        ],
        'item_list' => [
            [
                'id' => 'JJEE2443256789',
                'service' => 'PU',
                'comment' =>  "Comment",
                'receiverAddressee' => [
                    'person_name' => "xxx xxx",
                    'mobile' => '+372xxx',
                    'address' => ['offloadPostcode' => '96079'],
                ],
                'measures' => ['weight' => '0'],
                'add_service' => [
                    'option' => ['code' => 'ST'],
                ],
            ],
        ],
    ],
]);