feat: remove BankAccount domain and related functionality, including controller, model, requests, routes, and tests
This commit is contained in:
@@ -61,17 +61,26 @@ class PurchaseController extends Controller
|
||||
]);
|
||||
|
||||
if ($method === 'transfer') {
|
||||
$bankAccount = $tenant->selectedBankAccount;
|
||||
$telepagosService = new \App\Domains\Integration\Services\TelepagosIntegrationService();
|
||||
$telepagosService->forTenant($tenant->codigo);
|
||||
|
||||
return response()->json([
|
||||
'payment_method' => 'transfer',
|
||||
'transfer_data' => $bankAccount ? [
|
||||
'titular' => $bankAccount->titular,
|
||||
'entidad' => $bankAccount->entidad,
|
||||
'alias' => $bankAccount->alias,
|
||||
'cvu' => $bankAccount->cvu,
|
||||
] : null,
|
||||
]);
|
||||
try {
|
||||
$accountInfo = $telepagosService->getAccountInfo();
|
||||
|
||||
return response()->json([
|
||||
'payment_method' => 'transfer',
|
||||
'transfer_data' => [
|
||||
'titular' => $accountInfo['holder'] ?? null,
|
||||
'cvu' => $accountInfo['cvu'] ?? null,
|
||||
'alias' => $accountInfo['alias'] ?? null,
|
||||
'cuit' => $accountInfo['cuit'] ?? null,
|
||||
],
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
return response()->json([
|
||||
'message' => 'Error getting account info: ' . $e->getMessage()
|
||||
], 500);
|
||||
}
|
||||
}
|
||||
|
||||
if ($method === 'qr') {
|
||||
|
||||
Reference in New Issue
Block a user