[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: PaymentGatewayTableSeederVersionOne.php
<?php namespace Database\Seeders; use App\Enums\GatewayMode; use App\Enums\Activity; use App\Enums\InputType; use App\Models\GatewayOption; use App\Models\PaymentGateway; use Illuminate\Database\Seeder; class PaymentGatewayTableSeederVersionOne extends Seeder { /** * Run the database seeds. * * @return void */ public array $gateways = [ [ "name" => "Cash On Delivery", "slug" => "cash-on-delivery", "misc" => null, "status" => Activity::ENABLE, "options" => [], ], [ "name" => "Credit", "slug" => "credit", "misc" => null, "status" => Activity::ENABLE, "options" => [], ], [ "name" => "Paypal", "slug" => "paypal", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'paypal_app_id', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'paypal_client_id', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'paypal_client_secret', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'paypal_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'paypal_status', "value" => Activity::DISABLE, "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ], ] ], [ "name" => "Stripe", "slug" => "stripe", "misc" => [ 'input' => ['stripe.stripeInput.blade.php'], 'js' => ['stripe.stripeJs.blade.php'], 'submit' => true ], "status" => Activity::DISABLE, "options" => [ [ "option" => 'stripe_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'stripe_secret', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'stripe_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'stripe_status', "value" => Activity::DISABLE, "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ], ] ], [ "name" => "Flutterwave", "slug" => "flutterwave", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'flutterwave_public_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'flutterwave_secret_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'flutterwave_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'flutterwave_status', "value" => Activity::DISABLE, "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ], ] ], [ "name" => "Paystack", "slug" => "paystack", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'paystack_public_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'paystack_secret_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'paystack_payment_url', "type" => InputType::TEXT, "value" => 'https://api.paystack.co', "activities" => '' ], [ "option" => 'paystack_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'paystack_status', "value" => Activity::DISABLE, "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ], ] ], [ "name" => "SslCommerz", "slug" => "sslcommerz", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'sslcommerz_store_name', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'sslcommerz_store_id', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'sslcommerz_store_password', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'sslcommerz_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'sslcommerz_status', "value" => Activity::DISABLE, "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ], ] ], [ "name" => "Mollie", "slug" => "mollie", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'mollie_api_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'mollie_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'mollie_status', "value" => Activity::DISABLE, "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ], ] ], [ "name" => "Senangpay", "slug" => "senangpay", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'senangpay_merchant_id', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'senangpay_secret_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'senangpay_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'senangpay_status', "value" => Activity::DISABLE, "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ], ] ], [ "name" => "Bkash", "slug" => "bkash", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'bkash_app_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'bkash_app_secret', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'bkash_username', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'bkash_password', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'bkash_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'bkash_status', "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ] ] ], [ "name" => "Paytm", "slug" => "paytm", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'paytm_merchant_id', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'paytm_merchant_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'paytm_merchant_website', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'paytm_channel', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'paytm_industry_type', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'paytm_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'paytm_status', "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ] ] ], [ "name" => "Razorpay", "slug" => "razorpay", "misc" => [ 'input' => [], 'js' => ['razorpay.razorpayJs.blade.php'], 'submit' => false ], "status" => Activity::DISABLE, "options" => [ [ "option" => 'razorpay_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'razorpay_secret', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'razorpay_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'razorpay_status', "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ] ] ], [ "name" => "Mercadopago", "slug" => "mercadopago", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'mercadopago_client_id', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'mercadopago_client_secret', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'mercadopago_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'mercadopago_status', "value" => Activity::DISABLE, "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ], ] ], [ "name" => "Cashfree", "slug" => "cashfree", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'cashfree_app_id', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'cashfree_secret_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'cashfree_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'cashfree_status', "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ] ] ], [ "name" => "Payfast", "slug" => "payfast", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'payfast_merchant_id', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'payfast_merchant_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'payfast_passphrase', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'payfast_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'payfast_status', "value" => Activity::DISABLE, "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ], ] ], [ "name" => "Skrill", "slug" => "skrill", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'skrill_merchant_email', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'skrill_merchant_api_password', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'skrill_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'skrill_status', "value" => Activity::DISABLE, "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ], ] ], [ "name" => "PhonePe", "slug" => "phonepe", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'phonepe_merchant_id', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'phonepe_merchant_user_id', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'phonepe_key_index', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'phonepe_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'phonepe_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'phonepe_status', "value" => Activity::DISABLE, "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ], ] ], [ "name" => "Telr", "slug" => "telr", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'telr_store_id', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'telr_store_auth_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'telr_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'telr_status', "value" => Activity::DISABLE, "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ], ] ], [ "name" => "Iyzico", "slug" => "iyzico", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'iyzico_api_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'iyzico_secret_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'iyzico_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'iyzico_status', "value" => Activity::DISABLE, "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ], ] ], [ "name" => "Pesapal", "slug" => "pesapal", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'pesapal_consumer_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'pesapal_consumer_secret', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'pesapal_ipn_id', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'pesapal_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'pesapal_status', "value" => Activity::DISABLE, "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ], ] ], [ "name" => "Midtrans", "slug" => "midtrans", "misc" => null, "status" => Activity::DISABLE, "options" => [ [ "option" => 'midtrans_server_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'midtrans_client_key', "type" => InputType::TEXT, "activities" => '' ], [ "option" => 'midtrans_mode', "type" => InputType::SELECT, "activities" => [ GatewayMode::SANDBOX => 'sandbox', GatewayMode::LIVE => 'live' ] ], [ "option" => 'midtrans_status', "value" => Activity::DISABLE, "type" => InputType::SELECT, "activities" => [ Activity::ENABLE => "enable", Activity::DISABLE => "disable", ] ], ] ] ]; public function run(): void { foreach ($this->gateways as $gateway) { $payment = PaymentGateway::create([ 'name' => $gateway['name'], 'slug' => $gateway['slug'], 'misc' => json_encode($gateway['misc']), 'status' => $gateway['status'] ]); $payment->addMedia(public_path('/images/payment-gateway/' . $gateway['slug'] . '.png'))->preservingOriginal()->toMediaCollection('payment-gateway'); $this->gatewayOption($payment->id, $gateway['options']); } } public function gatewayOption($id, $options): void { if (!blank($options)) { foreach ($options as $option) { GatewayOption::create([ 'model_id' => $id, 'model_type' => 'App\Models\PaymentGateway', 'option' => $option['option'], 'value' => $option['value'] ?? "", 'type' => $option['type'], 'activities' => json_encode($option['activities']), ]); } } } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.81 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002