Point in-app wallet top-up at the billing API (key the app already holds)
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:
isaacclad
2026-06-26 06:23:03 +00:00
co-authored by Claude Opus 4.8
parent 73faa20fff
commit b7adb69245
3 changed files with 19 additions and 21 deletions
-18
View File
@@ -43,24 +43,6 @@ class IdentityClient
return (array) $response->json('data', []);
}
/**
* Start a central-wallet Paystack top-up for an account and return the
* Paystack checkout URL. Backs the in-app "Add funds" modal so users top up
* without leaving the app for the central wallet page.
*/
public function walletTopup(string $publicId, float $amount, string $returnUrl): string
{
$response = $this->request()->post($this->url('/identity/wallet-topup-account'), [
'user' => $publicId,
'amount' => $amount,
'return_url' => $returnUrl,
]);
$response->throw();
return (string) $response->json('data.checkout_url', '');
}
private function request()
{
return Http::withToken((string) config('identity.api_key'))