replace code proccess

Replace:

protect function_set_proses($trx)
{
$this->db->where(‘tr_id’, $trx->tr_id);
$this->db->set(‘tr_status’, ‘-‘);
$this->db->update(‘transaksi’);
}

 

protected function _set_proses($trx)
{
$pesan = “Trx #$trx->tr_id $trx->op_nama – $trx->vo_nominal ke ” . ($trx->tr_id_plgn ? $trx->tr_id_plgn : $trx->tr_no_hp) . ” Sedang Diproses.”;
if ($trx->us_id)
{
$this->db->insert(‘notifikasi’, array(
‘us_id’ => $trx->us_id,
‘nf_judul’ => ‘Status Order #’ . $trx->tr_id,
‘nf_teks’ => $pesan,
‘nf_link’ => ‘akun/riwayat-transaksi/view/’ . $trx->tr_id,
‘nf_feedback’ => ‘1’,
‘nf_tanggal’ => time(),
));
if ($this->telegram_token && isset($opsi[‘telegram_chat_id’])) {
$this->telegram->send_request(‘sendMessage’, array(
‘chat_id’ => $opsi[‘telegram_chat_id’],
‘text’ => $pesan . “\r\n\r\nCek transaksi /trx” . $trx->tr_id,
‘disable_web_page_preview’ => true,
));
}
if ($this->system->perm->email_order == ‘yes’)
{
$this->sendmails[] = array(
‘kepada’ => $trx->us_email,
‘subjek’ => ‘Status Order #’ . $trx->tr_id,
‘pesan’ => $pesan . “\r\n” . site_url(‘akun/riwayat-transaksi/view/’ . $trx->tr_id),
);
}
}
$this->db->insert(‘notifikasi’, array(
‘us_id’ => ‘0’,
‘nf_admin’ => ‘1’,
‘nf_judul’ => $this->servers[$trx->sv_id][‘sv_nama’],
‘nf_teks’ => $inbox ? $inbox[‘in_message’] : $pesan,
‘nf_link’ => ‘admin/transaksi/view/’ . $trx->tr_id,
‘nf_feedback’ => ‘1’,
‘nf_tanggal’ => time(),
));
if ($this->notifikasi_config[’email’])
{
$this->sendmails[] = array(
‘kepada’ => $this->notifikasi_config[’email’],
‘subjek’ => $this->servers[$trx->sv_id][‘sv_nama’],
‘pesan’ => ($inbox ? $inbox[‘in_message’] : $pesan) . “\r\n” . site_url(‘admin/transaksi/view/’ . $trx->tr_id),
);
}

//Notifikasi Telegram Admin
if ($this->telegram_token)
{
$this->telegram->send_request(‘sendMessage’, array(
‘chat_id’ => “324204426”, //Ganti dengan ID Telegram Anda
‘text’ => $pesan . “\r\n\r\nCek transaksi /trx” . $trx->tr_id,
‘disable_web_page_preview’ => true,
));
}

$this->db->where(‘tr_id’, $trx->tr_id);
$this->db->set(‘tr_status’, ‘-‘);
$this->db->update(‘transaksi’);
}