chargebee / chargebee-php

PHP library for the Chargebee API.
https://apidocs.chargebee.com/docs/api?lang=php
MIT License
72 stars 62 forks source link

Add guzzle client as class member #43

Closed melihucar closed 1 month ago

melihucar commented 2 years ago

We are using our charge app behind a proxy manager and need to set proxy settings for guzzle client. Moved client instance from ChargeBee\ChargeBee\Guzzle::request to a new class member as $client and added public setter / private getter. If a custom client is not set getClient initializing a new Guzzle\Client

Example usage will be like:

\ChargeBee\ChargeBee\Guzzle::setClient(new GuzzleHttp\Client([
    'proxy' => [
        'http'  => 'http://localhost:8125', // Use this proxy with "http"
        'https' => 'http://localhost:9124', // Use this proxy with "https"
    ]
]));
sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information