I set up simple paypal check out with Rest Api (not credit card payment).
Everything works perfectly in Sandbox mode, but when I switch to Live mode and use Live mode clientID with Secret key. I get this error:
PHP Fatal error: Uncaught exception 'PayPal\Exception\PayPalConnectionException' with message 'Got Http response code 401 when accessing https://api.sandbox.paypal.com/v1/oauth2/token.' in /vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalHttpConnection.php:154
Stack trace:
#0 /vendor/paypal/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php(241): PayPal\Core\PayPalHttpConnection->execute('grant_type=clie...')
#1 /vendor/paypal/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php(266): PayPal\Auth\OAuthTokenCredential->getToken(Array, '***', '***...', 'grant_type=clie...')
#2 /vendor/paypal/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php(210): PayPal\Auth\OAuthTokenCredential->generateAccessToken(Array, NULL)
#3 /vendor/paypal/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php(160 in /vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalHttpConnection.php on line 154
It happens only in Live mode... I checked all keys and everything is set up correctly, from my point of view. Please, let me know how this can be fixed?