forked from LiveCarta/PayPal-PHP-Server-SDK
Automated commit message
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user