Files
BE_IBL/application/controllers/test/T_wa_krm.php
2026-04-15 15:23:57 +07:00

55 lines
1.3 KiB
PHP

<?php
class T_wa_krm extends MY_Controller
{
function __construct()
{
parent::__construct();
}
function index()
{
$this->load->library("Wa_krmv3");
$result = $this->wa_krmv3->send_qrcode("087823783747", "http://localhost/charts/qrcomp.php?d=FO-23090002LA", "Tn. Kris", "20 Nov 2023");
print_r($result);
}
function rujukan()
{
$this->load->library("Wa_krmv3");
$result = $this->wa_krmv3->send_rujukan_external_process("087823783747", "022-123-456");
if ($result["code"] == 200) {
//
echo "Pesan berhasil di kirimkan";
} else {
//
echo "Pesan gagal";
print_r($result);
}
}
function eform()
{
$this->load->library("Wa_krmv3");
$result = $this->wa_krmv3->send_eform("087823783747", "DA", "0SXR045DA");
if ($result["code"] == 200) {
//
echo "Pesan berhasil di kirimkan";
} else {
//
echo "Pesan gagal";
print_r($result);
}
}
function otp()
{
$this->load->library("Wa_krmv3");
$result = $this->wa_krmv3->send_otp("087823783747", "DALT74");
header("Content-type: text/plain");
print_r($result);
if ($result["code"] == 200) {
//
echo "Pesan berhasil di kirimkan";
} else {
//
echo "Pesan gagal";
}
}
}