lintangtimur/cek-pajak-api

cek pajak kendaraan bermotor jateng

v1.1.1 2023-04-28 09:34 UTC

This package is auto-updated.

Last update: 2024-10-28 12:51:24 UTC


README

Unofficial API cek pajak esamsat jateng

image

Installation

Require this package with composer using the following command:

composer require lintangtimur/cek-pajak-api

Example

Register

<?php
use Stelin\CekPajakApi\CekPajak;

$form = [
    'name'=> 'lintang',
    'email'=> 'lintang@gmail.com',
    'password'=>'123456'
];

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

Login

<?php
use Stelin\CekPajakApi\CekPajak;

$form = [
    'name'=> 'lintang',
    'email'=> 'lintang@gmail.com',
    'password'=>'123456'
];

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

Check Pajak

<?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;

Contoh menggunakan SSL

Menambah option penggunaan ssl untuk endpoint api untuk user yang mengalami error SSL certificate problem

$form = [
    'name'=> 'lintang',
    'email'=> 'lintang@gmail.com',
    '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;