switched to paddle inline checkout, removed paypal and most of stripe. added product sync between app and paddle.
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\PayPal;
|
||||
|
||||
use PaypalServerSdkLib\PaypalServerSdkClient;
|
||||
use PaypalServerSdkLib\PaypalServerSdkClientBuilder;
|
||||
use PaypalServerSdkLib\Authentication\ClientCredentialsAuthCredentialsBuilder;
|
||||
use PaypalServerSdkLib\Environment;
|
||||
|
||||
class PaypalClientFactory
|
||||
{
|
||||
public function make(?bool $sandbox = null, ?string $clientId = null, ?string $clientSecret = null): PaypalServerSdkClient
|
||||
{
|
||||
$clientId = $clientId ?? config('services.paypal.client_id');
|
||||
$clientSecret = $clientSecret ?? config('services.paypal.secret');
|
||||
$isSandbox = $sandbox ?? config('services.paypal.sandbox', true);
|
||||
|
||||
$environment = $isSandbox ? Environment::SANDBOX : Environment::PRODUCTION;
|
||||
|
||||
return PaypalServerSdkClientBuilder::init()
|
||||
->clientCredentialsAuthCredentials(
|
||||
ClientCredentialsAuthCredentialsBuilder::init($clientId, $clientSecret)
|
||||
)
|
||||
->environment($environment)
|
||||
->build();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user