invoiceninja/database/migrations/2021_08_14_054458_square_payment_driver.php
2021-08-14 18:11:45 +10:00

50 lines
1.0 KiB
PHP

<?php
use App\Models\Gateway;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
class SquarePaymentDriver extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Model::unguard();
$fields = new \stdClass;
$fields->accessToken = "";
$fields->applicationId = "";
$fields->locationId = "";
$fields->testMode = false;
$square = new Gateway();
$square->id = 57;
$square->name = "Square";
$square->provider = "Square";
$square->key = '65faab2ab6e3223dbe848b1686490baz';
$square->sort_order = 4343;
$square->is_offsite = false;
$square->visible = true;
$square->fields = json_encode($fields);
$square->save();
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}