Unofficial API cek pajak esamsat jateng
Require this package with composer using the following command:
composer require lintangtimur/cek-pajak-api
<?php
use Stelin\CekPajakApi\CekPajak;
$form = [
'name'=> 'lintang',
'email'=> '[email protected]',
'password'=>'123456'
];
$reg = new CekPajak();
$reg = (new CekPajak)->register($form);
<?php
use Stelin\CekPajakApi\CekPajak;
$form = [
'name'=> 'lintang',
'email'=> '[email protected]',
'password'=>'123456'
];
$login = new CekPajak();
$login = (new CekPajak)->login($form)->accessToken;
<?php
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;
Menambah option penggunaan ssl untuk endpoint api untuk user yang mengalami error SSL certificate problem
$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;