PayPal\Core\PayPalHttpConnection::execute:207
string(46) "https://api.sandbox.paypal.com/v1/oauth2/token"
Create Payment Using Credit Card. If 500 Exception, try creating a new Credit Card using Step 4, on this link, and using it.{ "intent": "sale", "payer": { "payment_method": "credit_card", "funding_instruments": [ { "credit_card": { "type": "visa", "number": "4148529247832259", "expire_month": "15", "expire_year": "2025", "cvv2": "123", "first_name": "Joe", "last_name": "Shopper" } } ] }, "transactions": [ { "amount": { "currency": "USD", "total": "20", "details": { "shipping": "1.20", "tax": "1.30", "subtotal": "17.50" } }, "item_list": { "items": [ { "name": "Ground Coffee 40 oz", "description": "Ground Coffee 40 oz", "currency": "USD", "quantity": 1, "tax": "0.30", "price": "7.50" }, { "name": "Granola bars", "description": "Granola Bars with Peanuts", "currency": "USD", "quantity": 5, "tax": "0.20", "price": "2" } ] }, "description": "Payment description", "invoice_number": "65d98a7cd5b54" } ] }PayPal\Exception\PayPalConnectionException: Got Http response code 401 when accessing https://api.sandbox.paypal.com/v1/oauth2/token. in /var/www/html/ohnishi-test.site/_paypal-develop-php/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalHttpConnection.php:208 Stack trace: #0 /var/www/html/ohnishi-test.site/_paypal-develop-php/vendor/paypal/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php(252): PayPal\Core\PayPalHttpConnection->execute() #1 /var/www/html/ohnishi-test.site/_paypal-develop-php/vendor/paypal/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php(280): PayPal\Auth\OAuthTokenCredential->getToken() #2 /var/www/html/ohnishi-test.site/_paypal-develop-php/vendor/paypal/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php(216): PayPal\Auth\OAuthTokenCredential->generateAccessToken() #3 /var/www/html/ohnishi-test.site/_paypal-develop-php/vendor/paypal/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php(166): PayPal\Auth\OAuthTokenCredential->updateAccessToken() #4 /var/www/html/ohnishi-test.site/_paypal-develop-php/vendor/paypal/rest-api-sdk-php/lib/PayPal/Handler/RestHandler.php(82): PayPal\Auth\OAuthTokenCredential->getAccessToken() #5 /var/www/html/ohnishi-test.site/_paypal-develop-php/vendor/paypal/rest-api-sdk-php/lib/PayPal/Transport/PayPalRestCall.php(75): PayPal\Handler\RestHandler->handle() #6 /var/www/html/ohnishi-test.site/_paypal-develop-php/vendor/paypal/rest-api-sdk-php/lib/PayPal/Common/PayPalResourceModel.php(104): PayPal\Transport\PayPalRestCall->execute() #7 /var/www/html/ohnishi-test.site/_paypal-develop-php/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/Payment.php(571): PayPal\Common\PayPalResourceModel::executeCall() #8 /var/www/html/ohnishi-test.site/_paypal-develop-php/CreatePayment.php(108): PayPal\Api\Payment->create() #9 {main}