PHP code example of lintangtimur / cek-pajak-api

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

    

lintangtimur / cek-pajak-api example snippets



use Stelin\CekPajakApi\CekPajak;

$form = [
    'name'=> 'lintang',
    'email'=> '[email protected]',
    'password'=>'123456'
];

$reg = new CekPajak();
$reg = (new CekPajak)->register($form);


use Stelin\CekPajakApi\CekPajak;

$form = [
    'name'=> 'lintang',
    'email'=> '[email protected]',
    'password'=>'123456'
];

$login = new CekPajak();
$login = (new CekPajak)->login($form)->accessToken;


use Stelin\CekPajakApi\CekPajak;

$cp = new CekPajak($accessToken);
$cp->cekPajak('H','1234','AA')->totalPkbPokok;

//Melihat rincian akhir pajak
$a->cekPajak('H','1234','AA')->rincian->masaAkhirBerlakuPajak;

$form = [
    'name'=> 'lintang',
    'email'=> '[email protected]',
    'password'=>'123456'
];

$login = new CekPajak();
$accessToken = $login->ssl(true)->login($form)->accessToken; //registrasi terlebih dahulu sebelum login
$accsess = new CekPajak($accessToken);
$total_pokok = $accsess->ssl(true)->cekPajak('H','1234','AA')->totalPkbPokok;
echo $total_pokok;