Point in-app wallet top-up at the billing API (key the app already holds)
Deploy Ladill QR Plus / deploy (push) Successful in 33s
Deploy Ladill QR Plus / deploy (push) Successful in 33s
qr-plus authenticates to the monolith with a billing service key, not an identity key, so the modal's top-up now goes through BillingClient::topup -> POST /api/billing/topup. Drops the unused IdentityClient::walletTopup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
73faa20fff
commit
b7adb69245
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Services\Identity\IdentityClient;
|
||||
use App\Services\Billing\BillingClient;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -15,7 +15,7 @@ use Illuminate\Http\Request;
|
||||
*/
|
||||
class WalletTopupController extends Controller
|
||||
{
|
||||
public function store(Request $request, IdentityClient $identity): JsonResponse|RedirectResponse
|
||||
public function store(Request $request, BillingClient $billing): JsonResponse|RedirectResponse
|
||||
{
|
||||
$validated = $request->validate([
|
||||
'amount' => ['required', 'numeric', 'min:5', 'max:5000'],
|
||||
@@ -25,7 +25,7 @@ class WalletTopupController extends Controller
|
||||
$returnUrl = $validated['return_url'] ?? (string) (url()->previous() ?: url('/'));
|
||||
|
||||
try {
|
||||
$checkoutUrl = $identity->walletTopup(
|
||||
$checkoutUrl = $billing->topup(
|
||||
(string) $request->user()->public_id,
|
||||
(float) $validated['amount'],
|
||||
$returnUrl,
|
||||
|
||||
Reference in New Issue
Block a user