Update WhatsappHelper.php
This commit is contained in:
@@ -8,15 +8,6 @@ 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();
|
||||
@@ -48,9 +39,9 @@ class WhatsappHelper
|
||||
|
||||
try {
|
||||
// Send the request to the WABLAS API
|
||||
$response = $client->post(self::$wablasHost . '/api/v2/send-message', [
|
||||
$response = $client->post(env('WABLAS_HOST') . '/api/v2/send-message', [
|
||||
'headers' => [
|
||||
'Authorization' => self::$wablasToken,
|
||||
'Authorization' => env('WABLAS_TOKEN'),
|
||||
'Content-Type' => 'application/json'
|
||||
],
|
||||
'json' => [
|
||||
@@ -97,9 +88,9 @@ class WhatsappHelper
|
||||
|
||||
try {
|
||||
// Send the request to the WABLAS API
|
||||
$response = $client->post(self::$wablasHost . '/api/v2/send-message', [
|
||||
$response = $client->post(env('WABLAS_HOST') . '/api/v2/send-message', [
|
||||
'headers' => [
|
||||
'Authorization' => self::$wablasToken,
|
||||
'Authorization' => env('WABLAS_TOKEN'),
|
||||
'Content-Type' => 'application/json'
|
||||
],
|
||||
'json' => [
|
||||
@@ -146,9 +137,9 @@ class WhatsappHelper
|
||||
|
||||
try {
|
||||
// Send the request to the WABLAS API
|
||||
$response = $client->post(self::$wablasHost . '/api/v2/send-message', [
|
||||
$response = $client->post(env('WABLAS_HOST') . '/api/v2/send-message', [
|
||||
'headers' => [
|
||||
'Authorization' => self::$wablasToken,
|
||||
'Authorization' => env('WABLAS_TOKEN'),
|
||||
'Content-Type' => 'application/json'
|
||||
],
|
||||
'json' => [
|
||||
@@ -195,9 +186,9 @@ class WhatsappHelper
|
||||
|
||||
try {
|
||||
// Send the request to the WABLAS API
|
||||
$response = $client->post(self::$wablasHost . '/api/v2/send-message', [
|
||||
$response = $client->post(env('WABLAS_HOST') . '/api/v2/send-message', [
|
||||
'headers' => [
|
||||
'Authorization' => self::$wablasToken,
|
||||
'Authorization' => env('WABLAS_TOKEN'),
|
||||
'Content-Type' => 'application/json'
|
||||
],
|
||||
'json' => [
|
||||
@@ -244,9 +235,9 @@ class WhatsappHelper
|
||||
|
||||
try {
|
||||
// Send the request to the WABLAS API
|
||||
$response = $client->post(self::$wablasHost . '/api/v2/send-message', [
|
||||
$response = $client->post(env('WABLAS_HOST') . '/api/v2/send-message', [
|
||||
'headers' => [
|
||||
'Authorization' => self::$wablasToken,
|
||||
'Authorization' => env('WABLAS_TOKEN'),
|
||||
'Content-Type' => 'application/json'
|
||||
],
|
||||
'json' => [
|
||||
|
||||
Reference in New Issue
Block a user