title: accept payment in paypal from credit card php
body: <p>I wanted to accept the payments from my store staying on my stor and don't wanted to go to the paypal I got the access token using curl but how could I use below code. I think this is the code that I should use for the payment. </p>
  
  <pre><code>curl -v https://api.sandbox.paypal.com/v1/payments/payment \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {accessToken}' \
  -d '{
    "intent":"sale",
    "redirect_urls":{
      "return_url":"http://&lt;return URL here&gt;",
      "cancel_url":"http://&lt;cancel URL here&gt;"
    },
    "payer":{
      "payment_method":"creditcard"
    },
    "transactions":[
      {
        "amount":{
          "total":"7.47",
          "currency":"USD"
        },
        "description":"This is the payment transaction description."
      }
    ]
  }'
  </code></pre>
  
  <p>I just need a trick to use this in curl and make payment by sending data to paypal and receive in json</p>