paddel setup

This commit is contained in:
Mark Gregory
2026-09-09 10:20:34 +01:00
parent e7ce20e580
commit ef294842d0
9 changed files with 476 additions and 26 deletions
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace App\Services\Payments;
use Illuminate\Support\Facades\Http;
final class PaddleClient
{
public function customer(?string $customerID): ?array
{
if (!$customerID || !config('rsync-studio.paddle.api_key')) return null;
$response = Http::baseUrl(config('rsync-studio.paddle.api_url'))
->withToken(config('rsync-studio.paddle.api_key'))
->acceptJson()
->timeout(10)
->get('/customers/'.$customerID);
if (!$response->successful()) return null;
$data = $response->json('data');
return is_array($data) ? $data : null;
}
}