index.php
861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
// irul @ 20200515
/**
* Make sure to activate: always_populate_raw_post_data = -1 in php.ini
*/
// Autoload files using composer
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/rpc/samsat-banten.php';
require_once __DIR__ . '/rest/bjb-uim.php';
require_once __DIR__ . '/rest/samsat-banten-new.php';
// Use this namespace
use Steampixel\Route;
// Add your first route
Route::add('/', function () {
echo 'Welcome :-)';
});
Route::add('/samsat-banten', function () {
new SamsatBanten();
}, 'post');
Route::add('/bjb-uim', function () {
bjbUIM::login();
}, 'post');
Route::add('/samsat-banten-new', function () {
SamsatBantenNew::inquiry();
}, 'get');
Route::add('/samsat-banten-new', function () {
SamsatBantenNew::payment();
}, 'post');
// Run the router
$baseUrl = '/fake-api';
Route::run($baseUrl);