invoiceninja/database/migrations/2024_05_03_145535_btcpay_gateway.php
Nisaba d11766c1bd
initial BTCPay commit
Signed-off-by: Nisaba <34550856+Nisaba@users.noreply.github.com>
2024-05-13 16:33:15 +00:00

43 lines
999 B
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
{
$gateway = new Gateway;
$gateway->name = 'BTCPay';
$gateway->key = 'vpyfbmdrkqcicpkjqdusgjfluebftuva';
$gateway->provider = 'BTCPay';
$gateway->is_offsite = true;
$btcpayFieds = new \stdClass;
$btcpayFieds->btcpayUrl = "";
$btcpayFieds->apiKey = "";
$btcpayFieds->storeId = "";
$btcpayFieds->webhookSecret = "";
$gateway->fields = \json_encode($btcpayFieds);
$gateway->visible = true;
$gateway->site_url = 'https://btcpayserver.org';
$gateway->default_gateway_type_id = GatewayType::CRYPTO;
$gateway->save();
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};