Installation
composer require phpjuice/paypal-checkout-sdkSetup Credentials
Setup a Paypal Client
Create a client with sandbox environment
// import namespace
use PayPal\Http\Environment\SandboxEnvironment;
use PayPal\Http\PayPalClient;
// client id and client secret retrieved from PayPal
$clientId = "<<PAYPAL-CLIENT-ID>>";
$clientSecret = "<<PAYPAL-CLIENT-SECRET>>";
// create a new sandbox environment
$environment = new SandboxEnvironment($clientId, $clientSecret);
// create a new client
$client = new PayPalClient($environment);Create a client with production environment
Last updated
Was this helpful?