const axios = require('axios');
require('dotenv').config({ path: '.env.local' });

const cashifyClient = axios.create({
  baseURL: process.env.CASHIFY_BASE_URL,
  headers: {
    'x-license-key': process.env.CASHIFY_LICENSE_KEY,
    'content-type': 'application/json',
  },
});

async function main() {
  try {
    const res = await cashifyClient.post('/check-status', { transactionId: '2aaf47c9-7670-43a4-8781-d5bc765d3e57' });
    console.log("Check Status Response:", JSON.stringify(res.data, null, 2));
  } catch (error) {
    console.error(error?.response?.data || error);
  }
}

main();
