1
0

1.1.0 Release (#44)

* Automated commit message

* add changelog

---------

Co-authored-by: PayPalServerSDKs <server-sdks@paypal.com>
Co-authored-by: Patrick Powers <patickpowers@hey.com>
This commit is contained in:
Patrick Powers
2025-05-27 13:31:17 -05:00
committed by GitHub
parent 671a2b2e5a
commit 6da8b9b5b8
234 changed files with 3130 additions and 1544 deletions

View File

@@ -0,0 +1,38 @@
# ProxyConfigurationBuilder
Represents the proxy server configurations for API calls. Create instance using `ProxyConfigurationBuilder::init('http://your.proxy.host')`
## Methods
| Name | Description |
| --- | --- |
| `address(string $address)` | Sets the proxy host address. Should be set during initialization via init() method. |
| `port(int $port)` | Sets the port used to connect to the proxy server. **Default port:** 0 |
| `tunnel(bool $tunnel)` | Enables or disables tunneling through the proxy server. **Default tunnel:** false |
| `auth(string $user , string $pass)` | Sets both username and password in a single method. **Default user:** '', **Default pass:** '' |
| `authMethod(string $authMethod)` | Sets the proxy authentication method. **Default authMethod:** CURLAUTH_BASIC |
### Client Initialization with Proxy Configuration
To configure the SDK to use a proxy server, initialize the proxy configuration during client setup as shown in the Usage Example.
## Usage Example
```php
<?php
use PaypalServerSdkLib\PaypalServerSdkClientBuilder;
use PaypalServerSdkLib\Proxy\ProxyConfigurationBuilder;
// initialize the sdk client using a proxy configuration
$client = PaypalServerSdkClientBuilder::init()
->proxyConfiguration(
ProxyConfigurationBuilder::init('http://localhost')
->port(8080)
->auth('username', 'password')
->authMethod(CURLAUTH_BASIC)
->tunnel(true)
)
->build();
```