Files
portal-api/app/Support/VietQr.php
baodev0andClaude Sonnet 5.5 55a834a2f8 feat: nhắc gia hạn QR theo dịch vụ, failover server hosting, CCCD admin, log cấp phát dịch vụ
- Mail campaign: mẫu nhắc gia hạn thanh toán QR, chọn dịch vụ + chu kỳ từng dòng (renewal_services)
- Hosting: nhiều server Plesk cho một gói (service_plan_servers), chuyển server khi server chết
- Admin xem/sửa giấy tờ định danh khách, tuỳ chọn gia hạn cho khách, nhật ký cấp phát dịch vụ
- Đánh dấu mẫu email dịch vụ là non-marketing

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 18:36:41 +07:00

20 lines
574 B
PHP

<?php
namespace App\Support;
use App\Models\Bank;
class VietQr
{
public static function url(Bank $bank, string $amount, string $content): string
{
$params = array_filter([
'amount' => preg_replace('/\D/', '', $amount),
'addInfo' => trim($content),
'accountName' => $bank->account_name,
], fn (?string $value) => $value !== null && $value !== '');
return "https://img.vietqr.io/image/{$bank->bank_code}-{$bank->account_no}-compact2.png?" . http_build_query($params, '', '&', PHP_QUERY_RFC3986);
}
}