WIP: feature/integrasi-primayan-v2 #3
165
docs/postman/ProviderOnline-v1.postman_collection.json
Normal file
165
docs/postman/ProviderOnline-v1.postman_collection.json
Normal file
@@ -0,0 +1,165 @@
|
||||
{
|
||||
"info": {
|
||||
"name": "ProviderOnline v1 Flow",
|
||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
||||
},
|
||||
"variable": [
|
||||
{ "key": "base_url", "value": "http://127.0.0.1:8000" },
|
||||
{ "key": "username", "value": "provtest" },
|
||||
{ "key": "password", "value": "provpass" },
|
||||
{ "key": "kodeprovider", "value": "MAN000000000Q" },
|
||||
{ "key": "nokartu", "value": "WS2026021" },
|
||||
{ "key": "kodebenefit", "value": "OP-GPSPHG001" },
|
||||
{ "key": "p_user_no", "value": "1" },
|
||||
{ "key": "p_token", "value": "" },
|
||||
{ "key": "noklaim", "value": "" }
|
||||
],
|
||||
"item": [
|
||||
{
|
||||
"name": "1. HeaderKey",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{ "key": "Content-Type", "value": "application/json" },
|
||||
{ "key": "Accept", "value": "application/json" }
|
||||
],
|
||||
"url": "{{base_url}}/api/v1/bridging-service/ProviderOnline/HeaderKey",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"username\": \"{{username}}\",\n \"password\": \"{{password}}\",\n \"kodeprovider\": \"{{kodeprovider}}\"\n}"
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('200', () => pm.response.to.have.status(200));",
|
||||
"const j = pm.response.json();",
|
||||
"pm.environment.set('p_user_no', String(j.userid));",
|
||||
"pm.environment.set('p_token', j.usertoken);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "2. EligibilitasPeserta",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{ "key": "Content-Type", "value": "application/json" },
|
||||
{ "key": "Accept", "value": "application/json" }
|
||||
],
|
||||
"url": "{{base_url}}/api/v1/bridging-service/ProviderOnline/EligibilitasPeserta",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"nokartu\": \"{{nokartu}}\",\n \"kodeprovider\": \"{{kodeprovider}}\",\n \"p_user_no\": {{p_user_no}},\n \"p_token\": \"{{p_token}}\"\n}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "3. Pendaftaran",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{ "key": "Content-Type", "value": "application/json" },
|
||||
{ "key": "Accept", "value": "application/json" }
|
||||
],
|
||||
"url": "{{base_url}}/api/v1/bridging-service/ProviderOnline/Pendaftaran",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"kodeprovider\": \"{{kodeprovider}}\",\n \"kodebenefit\": \"{{kodebenefit}}\",\n \"statusrujukan\": \"Y\",\n \"nomorrujukan\": \"RJ-20260515-0001\",\n \"keterangan\": \"Rawat jalan kontrol\",\n \"nomorsep\": \"SEP-20260515-0001\",\n \"nokartu\": \"{{nokartu}}\",\n \"kelaskamar\": \"KELAS-1\",\n \"cobbpjs\": 0,\n \"notransaksiprovider\": \"TRX-RS-20260515-0001\",\n \"inacbgscode\": \"E-4-10-I\",\n \"inacbgsamount\": 3200000,\n \"p_user_no\": {{p_user_no}},\n \"p_token\": \"{{p_token}}\"\n}"
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"const j = pm.response.json();",
|
||||
"if (j && j.Data && j.Data[0] && j.Data[0].noklaim) pm.environment.set('noklaim', j.Data[0].noklaim);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "4. BillingSementara",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{ "key": "Content-Type", "value": "application/json" },
|
||||
{ "key": "Accept", "value": "application/json" }
|
||||
],
|
||||
"url": "{{base_url}}/api/v1/bridging-service/ProviderOnline/BillingSementara",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"noklaim\": \"{{noklaim}}\",\n \"kodeprovider\": \"{{kodeprovider}}\",\n \"tanggalkeluar\": \"2026-05-15T10:00:00Z\",\n \"kodediagnosa\": \"I10\",\n \"daftarbiaya\": [\n { \"kodesubbenefit\": \"OPCONS1\", \"biayaaju\": 1500000 },\n { \"kodesubbenefit\": \"OPDIAG1\", \"biayaaju\": 1700000 }\n ],\n \"p_user_no\": {{p_user_no}},\n \"p_token\": \"{{p_token}}\"\n}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "5. Pengesahan",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{ "key": "Content-Type", "value": "application/json" },
|
||||
{ "key": "Accept", "value": "application/json" }
|
||||
],
|
||||
"url": "{{base_url}}/api/v1/bridging-service/ProviderOnline/Pengesahan",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"noklaim\": \"{{noklaim}}\",\n \"kodeprovider\": \"{{kodeprovider}}\",\n \"tanggalkeluar\": \"2026-05-15T10:00:00Z\",\n \"kodediagnosa\": \"I10\",\n \"inacbgscode\": \"E-4-10-I\",\n \"inacbgsamount\": 3200000,\n \"daftarbiaya\": [\n { \"kodesubbenefit\": \"OPCONS1\", \"biayaaju\": 1500000 },\n { \"kodesubbenefit\": \"OPDIAG1\", \"biayaaju\": 1700000 }\n ],\n \"p_user_no\": {{p_user_no}},\n \"p_token\": \"{{p_token}}\"\n}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "6. RincianBiayaKlaim",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{ "key": "Content-Type", "value": "application/json" },
|
||||
{ "key": "Accept", "value": "application/json" }
|
||||
],
|
||||
"url": "{{base_url}}/api/v1/bridging-service/ProviderOnline/RincianBiayaKlaim",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"noklaim\": \"{{noklaim}}\",\n \"kodeprovider\": \"{{kodeprovider}}\",\n \"p_user_no\": {{p_user_no}},\n \"p_token\": \"{{p_token}}\"\n}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "7. StrukPendaftaran",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{ "key": "Content-Type", "value": "application/json" },
|
||||
{ "key": "Accept", "value": "application/json" }
|
||||
],
|
||||
"url": "{{base_url}}/api/v1/bridging-service/ProviderOnline/StrukPendaftaran",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"noklaim\": \"{{noklaim}}\",\n \"kodeprovider\": \"{{kodeprovider}}\",\n \"p_user_no\": {{p_user_no}},\n \"p_token\": \"{{p_token}}\"\n}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "8. StrukPengesahan",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{ "key": "Content-Type", "value": "application/json" },
|
||||
{ "key": "Accept", "value": "application/json" }
|
||||
],
|
||||
"url": "{{base_url}}/api/v1/bridging-service/ProviderOnline/StrukPengesahan",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"noklaim\": \"{{noklaim}}\",\n \"kodeprovider\": \"{{kodeprovider}}\",\n \"p_user_no\": {{p_user_no}},\n \"p_token\": \"{{p_token}}\"\n}"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
33
tests/Feature/ProviderOnlineRouteTest.php
Normal file
33
tests/Feature/ProviderOnlineRouteTest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ProviderOnlineRouteTest extends TestCase
|
||||
{
|
||||
public function test_provider_online_routes_are_mapped_to_provider_integrations_controller(): void
|
||||
{
|
||||
$routes = [
|
||||
'/api/v1/bridging-service/ProviderOnline/HeaderKey' => 'getHeaderKey',
|
||||
'/api/v1/bridging-service/ProviderOnline/EligibilitasPeserta' => 'checkEligibilitasPeserta',
|
||||
'/api/v1/bridging-service/ProviderOnline/Pendaftaran' => 'createPendaftaran',
|
||||
'/api/v1/bridging-service/ProviderOnline/Pengesahan' => 'createPengesahan',
|
||||
'/api/v1/bridging-service/ProviderOnline/BillingSementara' => 'upsertBillingSementara',
|
||||
'/api/v1/bridging-service/ProviderOnline/RincianBiayaKlaim' => 'getRincianBiayaKlaim',
|
||||
'/api/v1/bridging-service/ProviderOnline/StrukPendaftaran' => 'downloadStrukPendaftaran',
|
||||
'/api/v1/bridging-service/ProviderOnline/StrukPengesahan' => 'downloadStrukPengesahan',
|
||||
];
|
||||
|
||||
foreach ($routes as $uri => $method) {
|
||||
$route = app('router')->getRoutes()->match(Request::create($uri, 'POST'));
|
||||
|
||||
$this->assertSame(
|
||||
'Modules\\ProviderIntegrations\\Http\\Controllers\\Api\\ProviderOnlineController@' . $method,
|
||||
$route->getActionName(),
|
||||
'Route mismatch for ' . $uri
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user