• I need to use the PayPal Subscription APIs in my WordPress website. The problem I’m having is that the PayPal documentation explains the APIs using cURL code. I need to “translate” the cURL code to PHP code for use with the WordPress wp_remote_post() function. For example, the PayPal cURL code to retrieve their Access Token is:

    curl -v -X POST “https://api-m.sandbox.paypal.com/v1/oauth2/token”\
    -u “CLIENT_ID:CLIENT_SECRET”\
    -H “Content-Type: application/x-www-form-urlencoded”\
    -d “grant_type=client_credentials”

    I have documentation that explains the cURL switches (the “-u, -H, and -d in the code above). What I don’t know how to do is “translate” the code associated with those switches into the syntax used for the WordPress wp_remote_post() function.

    Is there someone that could provide me with the code for the WordPress wp_remote_post() function that does the exact same thing as the cURL code above and explain how they arrived at the PHP code?

    Thanks In Advance For Your Help!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.