update api register

This commit is contained in:
Wian Drs
2026-08-01 11:42:42 +07:00
parent b0d08211ec
commit 75342dc7b7
55 changed files with 2254 additions and 35 deletions
@@ -4,6 +4,7 @@ namespace App\Services\Notification\Adapters;
use App\Models\NotificationDelivery;
use App\Services\Notification\Contracts\NotificationChannelAdapter;
use App\Services\Notification\WhapiIdService;
use Illuminate\Support\Facades\Http;
use Illuminate\Validation\ValidationException;
@@ -12,6 +13,11 @@ class WhatsAppUnofficialAdapter implements NotificationChannelAdapter
public function send(NotificationDelivery $delivery): array
{
$config = $delivery->channelConfig;
if ($config?->provider === 'whapi_id') {
$response = app(WhapiIdService::class)->send($config, $delivery->destination, $delivery->rendered_body);
return ['provider_message_id' => data_get($response, 'results.id_message'), 'response' => $response];
}
$credentials = $config?->credentials ?? [];
$settings = $config?->settings ?? [];
$url = $settings['send_url'] ?? null;