-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
128 lines (95 loc) · 3.56 KB
/
index.php
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
// import autoload
include __DIR__ . '/vendor/autoload.php';
// import package ofi\mobilepulsa
use ofi\mobilepulsa\mobilepulsa;
/**
* Import class class contoh (di dalam folder example)
*/
include __DIR__ . '/example/checkBalance.php';
include __DIR__ . '/example/prepaid.php';
include __DIR__ . '/example/callbackSample.php';
include __DIR__ . '/example/postpaid.php';
include __DIR__ . '/example/train.php';
echo "<pre>";
// @ check balance section
// untuk mengecek saldo, pertama buat instance baru
// dari class checkBalance
$checkBalance = new checkBalance;
// tampilkan hasilnya
// print_r($checkBalance->cekSaldo());
// @ prepaid section
// Buat instance baru class prepaid
$prepaid = new prepaid;
// kamu bisa menampilkan hasilnya dengan cara
// silahkan uncomment saja kode dibawah ini
// supaya hasilnya muncul :)
// print_r($prepaid->daftarHarga());
// print_r($prepaid->cekIdPemain());
// print_r($prepaid->daftarServerGame());
// print_r($prepaid->topUpPulsa());
// print_r($prepaid->topUpVoucherGame());
// print_r($prepaid->topUpVoucherAlfamart());
// print_r($prepaid->autoDetectOperatorPriceList());
// deteksi jenis operator nomor hp
// print_r(mobilepulsa::deteksiOperatorNoHp('08986642927'));
// tangkap semua response dari callback
// pertama buat instance callbackSample terlebih dahulu
$callbackSample = new callbackSample;
// cetak hasil
// print_r($callbackSample->tangkapCallback());
// atau kamu bisa menyimpannya menjadi log txt
// print_r($callbackSample->simpanSebagaiLogTxt());
// cek status transaksi
// print_r($prepaid -> cekStatusTransaksi());
// cek informasi pelanggan pln
// print_r($prepaid->cekPelangganPLN());
// mencetak prepaid response kode
// print_r($prepaid->kodeRespon());
// @ postpaid section
$postpaid = new postpaid;
// daftar harga postpaid (daftar harga pln)
// print_r($postpaid -> daftarHarga());
// tampilkan daftar harga postpaid (daftar harga bpjs)
// print_r($postpaid -> daftarHargaBPJS());
// # membuat tagihan atau inquiry
// print_r($postpaid->buatTagihanBPJS());
// print_r($postpaid->buatTagihanGasNegara());
// print_r($postpaid->buatTagihanMULTIFINANCENONFNADIRA());
// print_r($postpaid->buatTagihanPDAM());
// print_r($postpaid->buatTagihanPLN());
// print_r($postpaid->buatTagihanTvNontelkomVision());
// print_r($postpaid->buatTagihanTvtelkomVision());
// print_r($postpaid->buatTagihanTelpPasca());
// print_r($postpaid->buatTagihanInternetNonTelkom());
// print_r($postpaid->buatTagihanInternetTelkomPSTN());
// print_r($postpaid->buatTagihanEsamsat());
// membayar transaksi dari proses inquiry
// print_r($postpaid->bayarTagihan());
// download struk dari transaksi yang dilakukan sebelumnya
// print_r($postpaid->downloadStruk());
// cek transaksi postpaid
// print_r($postpaid->cekTransaksi());
// tampilkan semua response code yang ada di postpaid
// print_r($postpaid->responseCode());
// @ train section
$train = new train;
// menampilkan daftar harga booking kereta
// print_r($train->daftarHarga());
// tampilkan daftar stasiun
// print_r($train->daftarStasiunKereta());
// cari kereta
// print_r($train->cariKereta());
// booking tiket kereta (masih bug)
// print_r($train->bookingKereta());
// menampilkan seatmap bedasarkan tiket (masih bug)
// print_r($train->seatMap());
// mengganti seatmap (masih bug)
// print_r($train->gantiSeatMap());
// batalkan pemesanan kereta
// print_r($train->batalkanPemesananKereta());
// bayar pemesanan kereta (masih bug)
// print_r($train->bayarPemesananKereta());
// menampilkan response code yang ada di section kereta / train
print_r($train->responseCode());
echo "</pre>";