Repository berikut ini merupakan porting dari ovoid untuk NodeJS
-
login2FA
-
login2FAVerify
-
loginSecurityCode
-
getBalance
-
getBudget
-
logout
-
unreadHistory
-
getWalletTransaction
-
generateTrxId
-
transferOvo
npm install ovoid
atau yarn add ovoid
const OVOID = require('ovoid');
let ovoid = new OVOID();
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"
}
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"
}
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');
ovoid = new OVOID(authToken.refresh_token)
Mendapatkan jumlah notifikasi akun ovo anda
let unread = await ovoid.getUnreadHistory();
Mendapatkan notifikasi akun ovo anda
let notif = await ovoid.getAllNotification();
Mendapatkan info profile ovo
let profile = await ovoid.getProfile();
Mendapatkan balance ovo anda, tipe wallet yang dapat dipilih :
-
cash : OVO Cash
-
point : OVO Point
let balanceCash = await ovoid.getBalance(tipe);
let isOVO = await ovoid.isOVO(nominal, 'nomortujuan');
let transferOvo = await ovoid.transferOvo('nomortujuan', nominal, 'catatan');
let getRefBank = await ovoid.getRefBank();
let transferInquiry = await ovoid.transferInquiry(no_rekening, nominal, 'kodebank', 'nama bank', 'catatan');
let transferBank = await ovoid.transferBank('nama penerima', 'nomor_akun_ovo', 'nomor_rekening_tujuan', nominal, 'kodebank', 'nama bank', 'pesan', 'catatan');
ovoid.logout();