PHP code example of jongotlin / arbetsgivarintyg

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

    

jongotlin / arbetsgivarintyg example snippets



$options = [
    'stream_context' => stream_context_create([
        'ssl' => [
            'verify_peer' => false,
            'verify_peer_name' => false,
            'allow_self_signed' => true,
        ]
    ]),
];
$service = new BizTalkServiceInstance($options);

$apiAuthentication = new ApiAuthentication('ftgXXXX');
$apiAuthentication->setApiNyckel('xxx');

$salaryBlock = new ApiCertificate_SalaryBlock();
$salaryBlock->setTypAvLon(LoneTyp::Daglon);
$salaryBlock->setAr(2020);
$salaryBlock->setBelopp(250.0);
$apiCertificate = new ApiCertificate();
$apiCertificate->setLon($salaryBlock);
$arrayOfApiCertificate = new ArrayOfApiCertificate();
$arrayOfApiCertificate->setApiCertifikat([$apiCertificate]);
$importRequest = new ImportRequest();
$importRequest->setArbetsgivarintyg($arrayOfApiCertificate);
$importRequest->setAutentisering($apiAuthentication);
$arbetsgivarintygServiceRequest = new ArbetsgivarintygServiceRequest($importRequest);
$arbetsgivarintygServiceResponse = $service->SaveArbetsgivarintygService($arbetsgivarintygServiceRequest);

echo $arbetsgivarintygServiceResponse->getResponse()->getResultCode();
echo $arbetsgivarintygServiceResponse->getResponse()->getResultMessage();