芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/yeahea.digitalhubbd.com/app/Models/SystemConfig.php
'boolean', 'vendor_needs_approval' => 'boolean', 'customer_needs_approval' => 'boolean', 'allow_guest_checkout' => 'boolean', 'auto_approve_order' => 'boolean', 'vendor_can_view_customer_info' => 'boolean', 'ask_customer_for_email_subscription' => 'boolean', 'notify_when_vendor_registered' => 'boolean', 'notify_when_dispute_appealed' => 'boolean', 'notify_new_message' => 'boolean', 'notify_new_ticket' => 'boolean', 'show_currency_symbol' => 'boolean', 'show_space_after_symbol' => 'boolean', 'show_address_title' => 'boolean', 'address_show_country' => 'boolean', 'address_show_map' => 'boolean', // 'google_analytic_report' => 'boolean', 'enable_chat' => 'boolean', 'show_seo_info_to_frontend' => 'boolean', 'can_use_own_catalog_only' => 'boolean', 'catalog_system_enable' => 'boolean', 'show_merchant_info_as_vendor' => 'boolean', 'show_item_conditions' => 'boolean', 'publicly_show_affiliate_commission' => 'boolean', ]; /** * Check if Chat enabled. * * @return bool */ public static function isChatEnabled() { return (bool) config('system_settings.enable_chat'); } /** * Check if newsletter has been Configured. * * @return bool */ public static function isNewsletterConfigured() { return (bool) config('newsletter.apiKey') && config('newsletter.lists.subscribers.id'); } /** * Check if customer needs approval * * @return bool */ public static function CustomerNeedsApproval() { return (bool) config('system_settings.customer_needs_approval'); } public static function vendorRegistrationHasAdditionalFields() { if (is_incevio_package_loaded('smartForm')) { return (bool) config('system_settings.smart_form_id_for_vendor_additional_info'); } return null; } /** * Check if vendor subscription billing configured for wallet * * @return bool */ public static function isBillingThroughWallet() { if (config('system.subscription.billing') == 'wallet') { $dependencies = ['wallet', 'subscription']; if (is_incevio_package_loaded($dependencies)) { return true; } throw new PluginFailed(trans('messages.dependent_package_failed', ['dependency' => implode(',', $dependencies)])); } return false; } /** * Check if give payment method is configured for platform * Mainly used in wallet module deposit * * @return bool */ public static function isPaymentConfigured($code) { switch ($code) { case 'stripe': return (bool) (config('services.stripe.key') && config('services.stripe.client_id') && config('services.stripe.secret')); case 'paypal-marketplace': return (bool) (config('paypalMarketplace.api.client_id') && config('paypalMarketplace.api.secret')); case 'instamojo': return (bool) (config('instamojo.api_key') && config('instamojo.auth_token')); case 'iyzico': return (bool) (config('iyzico.api.api_key') && config('iyzico.api.secret_key')); case 'paypal': return (bool) (config('paypal_payment.account.client_id') && config('paypal_payment.account.client_secret')); case 'payfast': return (bool) (config('payfast.merchant_id') && config('payfast.merchant_key')); case 'mercado-pago': return (bool) (config('mercadoPago.api.access_token') && config('mercadoPago.api.public_key')); case 'authorizenet': return (bool) (config('authorizenet.api_login_id') && config('authorizenet.transaction_key')); case 'cybersource': return (bool) (config('services.cybersource.merchant_id') && config('services.cybersource.api_key_id') && config('services.cybersource.secret')); case 'paystack': return (bool) (config('paystack.public_key') && config('paystack.secret')); case 'razorpay': return (bool) (config('razorpay.merchant.api_key') && config('razorpay.merchant.secret')); case 'sslcommerz': return (bool) (config('sslcommerz.api.store_id') && config('sslcommerz.api.store_password')); case 'flutterwave': return (bool) config('flutterwave.api.secret_key'); case 'mpesa': return (bool) (config('mpesa.api.consumer_key') && config('mpesa.api.consumer_secret')); case 'orangemoney': return (bool) (config('orangemoney.api') && config('orangemoney.api')); case 'mollie': return (bool) (config('mollie.api.merchant_key')); case 'bkash': return (bool) (config('bkash.api.app_key') && config('bkash.api.app_secret')); case 'paytm': return (bool) (config('paytm.api.merchant_id') && config('paytm.api.merchant_key')); case 'zcart-wallet': return customer_has_wallet(); case 'wire': case 'cod': return (bool) get_from_option_table('wallet_payment_info_' . $code); } return null; } }