Fixes for paypal auth credentials

This commit is contained in:
David Bomba 2024-06-16 17:22:15 +10:00
parent b45f9f711a
commit 1e0f250052
3 changed files with 12 additions and 3 deletions

View File

@ -146,6 +146,7 @@ class InvitationController extends Controller
} }
private function fireEntityViewedEvent($invitation, $entity_string) private function fireEntityViewedEvent($invitation, $entity_string)
{ {
switch ($entity_string) { switch ($entity_string) {

View File

@ -114,8 +114,16 @@ class PayPalBasePaymentDriver extends BaseDriver
$this->api_endpoint_url = $this->company_gateway->getConfigField('testMode') ? 'https://api-m.sandbox.paypal.com' : 'https://api-m.paypal.com'; $this->api_endpoint_url = $this->company_gateway->getConfigField('testMode') ? 'https://api-m.sandbox.paypal.com' : 'https://api-m.paypal.com';
$secret = $this->company_gateway->getConfigField('secret'); if(\App\Utils\Ninja::isHosted()) {
$client_id = $this->company_gateway->getConfigField('clientId'); $secret = config('ninja.paypal.secret');
$client_id = config('ninja.paypal.client_id');
}
else {
$secret = $this->company_gateway->getConfigField('secret');
$client_id = $this->company_gateway->getConfigField('clientId');
}
if($this->access_token && $this->token_expiry && $this->token_expiry->isFuture()) { if($this->access_token && $this->token_expiry && $this->token_expiry->isFuture()) {
return $this; return $this;

View File

@ -3,7 +3,7 @@ includes:
- ./vendor/spaze/phpstan-stripe/extension.neon - ./vendor/spaze/phpstan-stripe/extension.neon
- phpstan-baseline.neon - phpstan-baseline.neon
parameters: parameters:
level: 3 level: 4
paths: paths:
- app - app
excludePaths: excludePaths: