mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Migration
This commit is contained in:
parent
12466fe354
commit
6f136132c4
28
database/migrations/2021_10_07_141737_razorpay.php
Normal file
28
database/migrations/2021_10_07_141737_razorpay.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Gateway;
|
||||
use App\Models\GatewayType;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class Razorpay extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$gateway = new Gateway();
|
||||
$gateway->name = 'Razorpay';
|
||||
$gateway->key = Str::lower(Str::random(32));
|
||||
$gateway->provider = 'Razorpay';
|
||||
$gateway->is_offsite = false;
|
||||
$gateway->fields = new \stdClass;
|
||||
$gateway->visible = true;
|
||||
$gateway->site_url = 'https://razorpay.com';
|
||||
$gateway->default_gateway_type_id = GatewayType::HOSTED_PAGE;
|
||||
$gateway->save();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user