add migration to add rotessa payment gateway

This commit is contained in:
karneaud 2024-06-23 22:33:45 -04:00
parent a626073a74
commit b101b58294

View File

@ -1,8 +1,8 @@
<?php <?php
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use App\Models\Gateway; use App\Models\Gateway;
@ -30,7 +30,7 @@ return new class extends Migration
$gateway = $record; $gateway = $record;
} }
$gateway->id = $count + 4000; $gateway->id = 4002;
$gateway->name = 'Rotessa'; $gateway->name = 'Rotessa';
$gateway->key = Str::lower(Str::random(32)); $gateway->key = Str::lower(Str::random(32));
$gateway->provider = 'Rotessa'; $gateway->provider = 'Rotessa';
@ -41,7 +41,7 @@ return new class extends Migration
$gateway->default_gateway_type_id = 2; $gateway->default_gateway_type_id = 2;
$gateway->save(); $gateway->save();
Gateway::query()->where('name','=', 'Rotessa')->update(['visible' => 1]); Gateway::query()->where('name','=', 'Rotessa')->update(['visible' => 1]);
\DB::statement('SET FOREIGN_KEY_CHECKS=1;'); \DB::statement('SET FOREIGN_KEY_CHECKS=1;');
} }