2024-09-02 09:59:12 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use App\Models\Gateway;
|
|
|
|
use App\Models\GatewayType;
|
|
|
|
use Illuminate\Support\Str;
|
|
|
|
|
|
|
|
return new class extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*/
|
|
|
|
public function up(): void
|
|
|
|
{
|
2024-09-18 09:12:52 +02:00
|
|
|
if(!Gateway::find(65))
|
2024-09-02 09:59:12 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
$fields = new \stdClass;
|
|
|
|
$fields->apiKey = "";
|
2024-09-04 04:50:08 +02:00
|
|
|
$fields->callbackSecret = "";
|
2024-09-02 09:59:12 +02:00
|
|
|
|
|
|
|
$gateway = new Gateway;
|
2024-09-18 09:12:52 +02:00
|
|
|
$gateway->id = 65;
|
2024-09-02 09:59:12 +02:00
|
|
|
$gateway->name = 'Blockonomics';
|
|
|
|
$gateway->key = 'wbhf02us6owgo7p4nfjd0ymssdshks4d';
|
|
|
|
$gateway->provider = 'Blockonomics';
|
2024-09-18 09:12:52 +02:00
|
|
|
$gateway->is_offsite = false;
|
2024-09-02 09:59:12 +02:00
|
|
|
$gateway->fields = \json_encode($fields);
|
|
|
|
|
|
|
|
|
2024-09-19 00:04:24 +02:00
|
|
|
$gateway->visible = true;
|
2024-09-02 09:59:12 +02:00
|
|
|
$gateway->site_url = 'https://blockonomics.co';
|
|
|
|
$gateway->default_gateway_type_id = GatewayType::CRYPTO;
|
|
|
|
$gateway->save();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*/
|
|
|
|
public function down(): void
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
2024-09-13 06:08:13 +02:00
|
|
|
};
|