private function setApiProviderConfiguration($credentials)
    {
        // Setting PayPal API Credentials
        collect($credentials[$this->mode])->map(function ($value, $key) {
            $this->config[$key] = $value;
        });

        // Setup PayPal API Signature value to use.
        $this->config['signature'] = empty($this->config['certificate']) ?
        $this->config['secret'] : $this->config['certificate'];

        $this->paymentAction = $credentials['payment_action'];

        $this->locale = $credentials['locale'];

        $this->certificate = $this->config['certificate'];

        $this->validateSSL = $credentials['validate_ssl'];

        $this->setApiProvider($credentials);
    }