1
0

Automated commit message

This commit is contained in:
PayPalServerSDKs
2025-11-06 20:07:39 +00:00
parent 6da8b9b5b8
commit f774d5557c
488 changed files with 32098 additions and 4166 deletions

View File

@@ -17,6 +17,8 @@ use PaypalServerSdkLib\Authentication\ClientCredentialsAuthManager;
use PaypalServerSdkLib\Controllers\OAuthAuthorizationController;
use PaypalServerSdkLib\Controllers\OrdersController;
use PaypalServerSdkLib\Controllers\PaymentsController;
use PaypalServerSdkLib\Controllers\SubscriptionsController;
use PaypalServerSdkLib\Controllers\TransactionSearchController;
use PaypalServerSdkLib\Controllers\VaultController;
use PaypalServerSdkLib\Logging\LoggingConfigurationBuilder;
use PaypalServerSdkLib\Logging\RequestLoggingConfigurationBuilder;
@@ -34,6 +36,10 @@ class PaypalServerSdkClient implements ConfigurationInterface
private $vault;
private $transactionSearch;
private $subscriptions;
private $oAuthAuthorization;
private $clientCredentialsAuthManager;
@@ -68,7 +74,7 @@ class PaypalServerSdkClient implements ConfigurationInterface
->converter(new CompatibilityConverter())
->jsonHelper(ApiHelper::getJsonHelper())
->apiCallback($this->config['httpCallback'] ?? null)
->userAgent('PayPal REST API PHP SDK, Version: 1.1.0, on OS {os-info}')
->userAgent('PayPal REST API PHP SDK, Version: 2.0.0, on OS {os-info}')
->serverUrls(self::ENVIRONMENT_MAP[$this->getEnvironment()], Server::DEFAULT_)
->authManagers(['Oauth2' => $this->clientCredentialsAuthManager])
->loggingConfiguration($loggingConfiguration)
@@ -279,6 +285,28 @@ class PaypalServerSdkClient implements ConfigurationInterface
return $this->vault;
}
/**
* Returns Transaction Search Controller
*/
public function getTransactionSearchController(): TransactionSearchController
{
if ($this->transactionSearch == null) {
$this->transactionSearch = new TransactionSearchController($this->client);
}
return $this->transactionSearch;
}
/**
* Returns Subscriptions Controller
*/
public function getSubscriptionsController(): SubscriptionsController
{
if ($this->subscriptions == null) {
$this->subscriptions = new SubscriptionsController($this->client);
}
return $this->subscriptions;
}
/**
* Returns O Auth Authorization Controller
*/