After server switch, PayPal API url can't reach
AutoteileMarkt
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Apr-19-2023
04:15 AM
Hello,
we switched our production application to a new server and now the PayPal API can't call anymore. When I call
$ch = curl_init('https://api.sandbox.paypal.com/v1/oauth2/token');
$result = curl_exec($ch);
var_dump($result);
it runs into a timeout. Other URLs like google.com or something works fine, even paypal.com can reached, but not the API subdomain.
Edit: I think the API Urls was the problem. I found that the PHP SDK use "https://api.sandbox.paypal.com" but in the API docs is "https://api-m.sandbox.paypal.com". Weird that our old server can reach both API Urls (Ubuntu 16.04) and our new server (Ubuntu 22.04) can only reach the second one.
0 REPLIES 0

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Assistance Needed: Passing and Retrieving Custom Data in PayPal Webhook Payload in PayPal Payments Standard
- NOT ENABLED TO VAULT PAYMENT SOURCE in Sandbox Environment
- p is not a function error using the example downloaded from Paypal in SDKs
- Cannot create developer account from invitation link in Braintree Client-side Integration (JS, iOS, Android SDKs)
- How to integrate PayPal during user signup to avoid re-entering credentials for future payments? in REST APIs