| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | public function __construct( |
||
| 44 | string $clientId, |
||
| 45 | string $clientSecret, |
||
| 46 | LoggerInterface $logger, |
||
| 47 | SessionService $sessionService |
||
| 48 | ) { |
||
| 49 | $sessionClientId = $sessionService->session->get('PAYPAL_SDK_CLIENT_ID'); |
||
| 50 | $sessionClientSecret = $sessionService->session->get('PAYPAL_SDK_CLIENT_SECRET'); |
||
| 51 | $this->clientId = $sessionClientId ?? $clientId; |
||
| 52 | $this->clientSecret = $sessionClientSecret ?? $clientSecret; |
||
| 53 | $this->logger = $logger; |
||
| 54 | $apiContext = new ApiContext(new OAuthTokenCredential($this->clientId, $this->clientSecret)); |
||
| 55 | $apiContext->setConfig(['mode' => 'sandbox']); |
||
| 56 | $this->apiContext = $apiContext; |
||
| 57 | } |
||
| 58 | } |
||
| 59 |