Files
shopit-back/database/seeders/TelepagosIntegrationSeeder.php

51 lines
1.5 KiB
PHP

<?php
namespace Database\Seeders;
use App\Domains\Integration\Models\Integration;
use Illuminate\Database\Seeder;
class TelepagosIntegrationSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$integration = Integration::updateOrCreate(
['integration_code' => 'telepagos'],
[
'name' => 'Telepagos',
'url' => 'https://api.telepagos.com.ar',
'integration_data_schema' => [
'username' => 'required|string',
'password' => 'required|string',
]
]
);
$integrationHomo = Integration::updateOrCreate(
['integration_code' => 'telepagos_homo'],
[
'name' => 'Telepagos Homologación',
'url' => 'https://api.homo.telepagos.com.ar',
'integration_data_schema' => [
'username' => 'required|string',
'password' => 'required|string',
]
]
);
// Seed association for sonder tenant
$tenantIntegrationService = app(\App\Domains\Integration\Services\TenantIntegrationService::class);
$tenantIntegrationService->updateOrCreateIntegration(
'sonder',
$integration,
[
'username' => 'sonder_telepagos',
'password' => 'secret123',
]
);
}
}