update revisi
This commit is contained in:
@@ -8,6 +8,15 @@ use Illuminate\Support\Str;
|
||||
|
||||
class WhatsappHelper
|
||||
{
|
||||
protected $wablasHost;
|
||||
protected $wablasToken;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
self::$wablasHost = env('WABLAS_HOST');
|
||||
self::$wablasToken = env('WABLAS_TOKEN');
|
||||
}
|
||||
|
||||
public static function approveExpense($phones, $expense_number, $url = null, $tanggal, $total, $name)
|
||||
{
|
||||
$client = new Client();
|
||||
@@ -39,9 +48,9 @@ class WhatsappHelper
|
||||
|
||||
try {
|
||||
// Send the request to the WABLAS API
|
||||
$response = $client->post(env('WABLAS_HOST') . '/api/v2/send-message', [
|
||||
$response = $client->post(self::$wablasHost . '/api/v2/send-message', [
|
||||
'headers' => [
|
||||
'Authorization' => env('WABLAS_TOKEN'),
|
||||
'Authorization' => self::$wablasToken,
|
||||
'Content-Type' => 'application/json'
|
||||
],
|
||||
'json' => [
|
||||
@@ -88,9 +97,9 @@ class WhatsappHelper
|
||||
|
||||
try {
|
||||
// Send the request to the WABLAS API
|
||||
$response = $client->post(env('WABLAS_HOST') . '/api/v2/send-message', [
|
||||
$response = $client->post(self::$wablasHost . '/api/v2/send-message', [
|
||||
'headers' => [
|
||||
'Authorization' => env('WABLAS_TOKEN'),
|
||||
'Authorization' => self::$wablasToken,
|
||||
'Content-Type' => 'application/json'
|
||||
],
|
||||
'json' => [
|
||||
@@ -137,9 +146,9 @@ class WhatsappHelper
|
||||
|
||||
try {
|
||||
// Send the request to the WABLAS API
|
||||
$response = $client->post(env('WABLAS_HOST') . '/api/v2/send-message', [
|
||||
$response = $client->post(self::$wablasHost . '/api/v2/send-message', [
|
||||
'headers' => [
|
||||
'Authorization' => env('WABLAS_TOKEN'),
|
||||
'Authorization' => self::$wablasToken,
|
||||
'Content-Type' => 'application/json'
|
||||
],
|
||||
'json' => [
|
||||
@@ -186,9 +195,9 @@ class WhatsappHelper
|
||||
|
||||
try {
|
||||
// Send the request to the WABLAS API
|
||||
$response = $client->post(env('WABLAS_HOST') . '/api/v2/send-message', [
|
||||
$response = $client->post(self::$wablasHost . '/api/v2/send-message', [
|
||||
'headers' => [
|
||||
'Authorization' => env('WABLAS_TOKEN'),
|
||||
'Authorization' => self::$wablasToken,
|
||||
'Content-Type' => 'application/json'
|
||||
],
|
||||
'json' => [
|
||||
@@ -235,9 +244,9 @@ class WhatsappHelper
|
||||
|
||||
try {
|
||||
// Send the request to the WABLAS API
|
||||
$response = $client->post(env('WABLAS_HOST') . '/api/v2/send-message', [
|
||||
$response = $client->post(self::$wablasHost . '/api/v2/send-message', [
|
||||
'headers' => [
|
||||
'Authorization' => env('WABLAS_TOKEN'),
|
||||
'Authorization' => self::$wablasToken,
|
||||
'Content-Type' => 'application/json'
|
||||
],
|
||||
'json' => [
|
||||
|
||||
Reference in New Issue
Block a user