ardli-firman/php-bridging-bpjs

PHP Composer package for BPJS bridging (vclaim, antrol, aplicare, icare)

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/ardli-firman/php-bridging-bpjs

dev-main 2025-09-16 07:31 UTC

This package is auto-updated.

Last update: 2025-09-16 07:31:54 UTC


README

PHP Composer package for bridging various BPJS services (Vclaim, Antrol, Aplicare, Icare).

Installation

To install this package, you can use Composer. If you are using a private GitHub repository, please refer to the Composer documentation on how to add private VCS repositories.

composer require ardli-firman/php-bridging-bpjs

Configuration

This package requires several environment variables to be set in your .env file. Please create a .env file in the root of your project and add the following keys, replacing the placeholder values with your actual credentials:

API_BPJS_VCLAIM=YOUR_VCLAIM_ENDPOINT
CONS_ID=YOUR_CONS_ID
SECRET_KEY=YOUR_SECRET_KEY
USER_KEY_VCLAIM=YOUR_USER_KEY_VCLAIM
API_BPJS_ANTROL=YOUR_ANTROL_ENDPOINT
USER_KEY_ANTROL=YOUR_USER_KEY_ANTROL

Usage

Here's a basic example of how to use the ReferensiController to get poli data:

<?php

require_once __DIR__ . '/vendor/autoload.php';

use Bpjs\Bridging\ReferensiController;

// Ensure your .env file is loaded if not using a framework that does it automatically
// Dotenv\Dotenv::createUnsafeImmutable(__DIR__)->safeLoad();

$controller = new ReferensiController();

// Example: Get poli data for a specific code
$poliCode = '001'; // Replace with an actual poli code
$poliData = $controller->getPoli($poliCode);

print_r($poliData);

?>

Testing

This package uses Pest for testing. To run the tests, navigate to the project root and execute:

php vendor/bin/pest

Acknowledgments

This project is inspired by and built upon the work of virusphp/bridging-bpjs.