Route SMS voice uploads through Transfer with wallet billing.
Deploy Ladill Transfer / deploy (push) Successful in 28s

Add a service API for the Ladill SMS platform to store voice recordings in Transfer and charge monthly storage from the customer wallet.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-20 02:23:18 +00:00
co-authored by Cursor
parent eb9023340f
commit ccffa1433d
8 changed files with 281 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\Support;
use App\Models\QrCode;
use App\Models\Transfer;
use App\Models\TransferFile;
use RuntimeException;
class DirectTransferFileUrl
{
public static function for(Transfer $transfer, TransferFile $file): string
{
$shortCode = $transfer->qrCode?->short_code;
if ($shortCode === null || $shortCode === '') {
throw new RuntimeException('Transfer file URL is unavailable.');
}
return QrCode::publicBaseUrl().'/q/'.$shortCode.'/transfer/files/'.$file->id;
}
}