roicmedya-api
Version:
RoicMedya.com SMM Modülü ile Instagram ve diğer platformlar için takipçi ve beğeni entegrasyonlarını zahmetsizce yapın.
20 lines (17 loc) • 585 B
JavaScript
const axios = require('axios');
async function addCompensation(apiKey, baseURL, orderId) {
try {
const response = await axios.post(baseURL, {
key: apiKey,
action: 'refill',
order: orderId
});
if (!response.data || response.data.status !== 'active') {
throw new Error('Telafi işlemi aktif değil veya API null yanıt döndü.');
}
return response.data;
} catch (error) {
throw new Error(`Telafi işlemi yapılamadı: ${error.response?.data?.error || error.message}`);
}
}
module.exports = { addCompensation };