1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 23:22:52 +01:00
invoiceninja/database/migrations/2024_08_27_230111_blockonomics_gateway.php
David Bomba 5af3498d5a Cleanup
2024-09-19 08:04:24 +10:00

46 lines
1.0 KiB
PHP

<?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
{
if(!Gateway::find(65))
{
$fields = new \stdClass;
$fields->apiKey = "";
$fields->callbackSecret = "";
$gateway = new Gateway;
$gateway->id = 65;
$gateway->name = 'Blockonomics';
$gateway->key = 'wbhf02us6owgo7p4nfjd0ymssdshks4d';
$gateway->provider = 'Blockonomics';
$gateway->is_offsite = false;
$gateway->fields = \json_encode($fields);
$gateway->visible = true;
$gateway->site_url = 'https://blockonomics.co';
$gateway->default_gateway_type_id = GatewayType::CRYPTO;
$gateway->save();
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};