1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00
invoiceninja/database/migrations/2021_10_07_141737_razorpay.php

34 lines
849 B
PHP
Raw Normal View History

2021-10-07 16:22:16 +02:00
<?php
use App\Models\Gateway;
use App\Models\GatewayType;
use Illuminate\Database\Migrations\Migration;
2022-06-21 12:02:20 +02:00
return new class extends Migration
2021-10-07 16:22:16 +02:00
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$gateway = new Gateway();
2021-10-07 16:23:34 +02:00
$gateway->id = 58;
2021-10-07 16:22:16 +02:00
$gateway->name = 'Razorpay';
$gateway->key = 'hxd6gwg3ekb9tb3v9lptgx1mqyg69zu9';
2021-10-07 16:22:16 +02:00
$gateway->provider = 'Razorpay';
$gateway->is_offsite = false;
$configuration = new \stdClass;
$configuration->apiKey = '';
$configuration->apiSecret = '';
$gateway->fields = \json_encode($configuration);
2021-10-07 16:22:16 +02:00
$gateway->visible = true;
$gateway->site_url = 'https://razorpay.com';
$gateway->default_gateway_type_id = GatewayType::HOSTED_PAGE;
$gateway->save();
}
2022-06-21 12:02:20 +02:00
};