1. Go to this page and download the library: Download socialiteproviders/clover library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
socialiteproviders / clover example snippets
'clover' => [
'client_id' => env('CLOVER_CLIENT_ID'),
'client_secret' => env('CLOVER_CLIENT_SECRET'),
'redirect' => env('CLOVER_REDIRECT_URI')
'environment' => env('CLOVER_ENVIRONMENT', 'north_america'), // one of the following: 'sandbox', 'north_america' (for US/Canada), 'europe', or 'latin_america'
],
Route::get('clover/auth/callback', function () {
$user = Socialite::driver('clover')->user();
// Save these tokens somewhere for use with the API.
$token = $user->accessTokenResponseBody;
// Here’s what it looks like:
// [
// 'access_token' => 'JWT',
// 'access_token_expiration' => 1709563149,
// 'refresh_token' => 'clvroar-6e49ffe9b5122f137aa39d8f7f930558',
// 'refresh_token_expiration' => 1741097349,
// ]
// You may also want to store the merchant ID somewhere.
$merchantId = request()->input('merchant_id');
// Here’s what it looks like:
// 'ABC123DEF4567'
});
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.