Skip to content

Un-Official ovoid API Wrapper for NodeJS

License

Notifications You must be signed in to change notification settings

makanSukros/ovoid-nodejs

 
 

Repository files navigation

Un-Official ovoid API Wrapper for NodeJS

Repository berikut ini merupakan porting dari ovoid untuk NodeJS

enter image description here

Method

  • login2FA

  • login2FAVerify

  • loginSecurityCode

  • getBalance

  • getBudget

  • logout

  • unreadHistory

  • getWalletTransaction

  • generateTrxId

  • transferOvo

Instalasi

npm install ovoid atau yarn add ovoid

Dokumentasi

const OVOID =  require('ovoid');

let ovoid =  new  OVOID();

Login

Langkah 1
let refId =  await ovoid.login2FA('nomorhandphone');

Jika ingin menggunakan deviceId yg sudah pernah dipakai

let refId =  await ovoid.login2FA('nomorhandphone', 'deviceId');

Response:

{
  "otp_refId": "a82eddf0-1eee-400b-b8aa-xxxxxx",
  "device_id": "707503a4-9314-xxxx-a931-bf575c08b23b"
}
Langkah 2
let accessToken =  await ovoid.login2FAVerify(refId.otp_refId,'OTP','nomorhandphone', refId.device_id);

Response

{
      "otp_ref_id": "a82eddf0-1eee-400b-b8aa-1cce98fe10a8",
      "type": "LOGIN",
      "expires_at": "1630598216",
      "otp_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb2RlaGFzaCI6IlptWmxZekJrTnpBeU5ESXpOR00zTjJGbU1Ea3daakF6TXpJMk1qTXdNV1UiLCJyYW5kb20iOiJNamt3TmpNM056STQiLCJ2ZXJzaW9uIjoxfQ.xxxxxxxxxxxxxx"
}
Langkah 3
let authToken =  await ovoid.loginSecurityCode('PINOVO', accessToken.otp_token, 'nomorhandphone', refId.otp_refId, refId.device_id);

Jika ingin menggunakan FCM token yg sudah ada

let authToken =  await ovoid.loginSecurityCode('PINOVO', accessToken.otp_token, 'nomorhandphone', refId.otp_refId, refId.device_id, 'FCMToken');
Untuk mengakses resource selanjutnya
ovoid =  new  OVOID(authToken.refresh_token)

Mendapatkan jumlah notifikasi yang belum terbaca

Mendapatkan jumlah notifikasi akun ovo anda

let unread =  await ovoid.getUnreadHistory();

Mendapatkan notifikasi

Mendapatkan notifikasi akun ovo anda

let notif =  await ovoid.getAllNotification();

Info profile pengguna

Mendapatkan info profile ovo

let profile =  await ovoid.getProfile();

Mendapatkan balance

Mendapatkan balance ovo anda, tipe wallet yang dapat dipilih :

  • cash : OVO Cash

  • point : OVO Point

let balanceCash =  await ovoid.getBalance(tipe);

Transfer ke sesama OVO

Cek apakah nomor tujuan terdaftar di OVO
let isOVO =  await ovoid.isOVO(nominal, 'nomortujuan');
Transfer ke nomor tujuan
let transferOvo =  await ovoid.transferOvo('nomortujuan', nominal, 'catatan');

Transfer ke rekening bank

Cek kode bank
let getRefBank =  await ovoid.getRefBank();
Cek tujuan transfer (transfer inquiry)
let transferInquiry =  await ovoid.transferInquiry(no_rekening, nominal, 'kodebank', 'nama bank', 'catatan');
Transfer ke rekening tujuan
let transferBank =  await ovoid.transferBank('nama penerima', 'nomor_akun_ovo', 'nomor_rekening_tujuan', nominal, 'kodebank', 'nama bank', 'pesan', 'catatan');

Logout

ovoid.logout();

License

MIT

Author

Achmad Apriady

About

Un-Official ovoid API Wrapper for NodeJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%