Mini API: banks endpoint for payout-account picker.
Deploy Ladill Mini / deploy (push) Successful in 1m22s
Deploy Ladill Mini / deploy (push) Successful in 1m22s
GET /api/v1/mini/wallet/banks?type=bank|mobile_money proxies to the central identity banks endpoint so the app's payout sheet populates from Paystack. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
3406bd730a
commit
1b134d7fd3
@@ -63,6 +63,14 @@ class WalletController extends Controller
|
||||
return response()->json(['data' => ['checkout_url' => $checkoutUrl]]);
|
||||
}
|
||||
|
||||
public function banks(Request $request): JsonResponse
|
||||
{
|
||||
$type = $request->query('type') === 'mobile_money' ? 'mobile_money' : 'bank';
|
||||
$response = $this->identitySend('GET', '/api/identity/banks?type='.urlencode($type), []);
|
||||
|
||||
return response()->json(['data' => $response->json('data', [])]);
|
||||
}
|
||||
|
||||
public function payoutAccount(): JsonResponse
|
||||
{
|
||||
$response = $this->identitySend('GET', '/api/identity/payout-account?user='.urlencode((string) ladill_account()->public_id), []);
|
||||
|
||||
@@ -50,6 +50,7 @@ Route::prefix('v1')->group(function () {
|
||||
|
||||
Route::get('/mini/wallet', [MiniWalletController::class, 'show'])->name('api.mini.wallet');
|
||||
Route::post('/mini/wallet/topup', [MiniWalletController::class, 'topup'])->name('api.mini.wallet.topup');
|
||||
Route::get('/mini/wallet/banks', [MiniWalletController::class, 'banks'])->name('api.mini.wallet.banks');
|
||||
Route::get('/mini/wallet/payout-account', [MiniWalletController::class, 'payoutAccount'])->name('api.mini.wallet.payout-account');
|
||||
Route::put('/mini/wallet/payout-account', [MiniWalletController::class, 'updatePayoutAccount'])->name('api.mini.wallet.payout-account.update');
|
||||
Route::get('/mini/wallet/withdrawals', [MiniWalletController::class, 'withdrawals'])->name('api.mini.wallet.withdrawals');
|
||||
|
||||
Reference in New Issue
Block a user