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:03:51 +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';
|
2021-10-07 16:51:08 +02:00
|
|
|
$gateway->key = 'hxd6gwg3ekb9tb3v9lptgx1mqyg69zu9';
|
2021-10-07 16:22:16 +02:00
|
|
|
$gateway->provider = 'Razorpay';
|
|
|
|
$gateway->is_offsite = false;
|
2021-10-07 16:51:08 +02:00
|
|
|
|
|
|
|
$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
|
|
|
};
|