title: Problem to get payment details with PayPal
body: <p>I use a PayPal smart button and I need to get the payment details after user make payment.</p>
  <p>For example i need to get details so as below:</p>
  <pre><code>{
    &quot;id&quot;: &quot;5O190127TN364715T&quot;,
    &quot;status&quot;: &quot;COMPLETED&quot;,
    &quot;payer&quot;: {
      &quot;name&quot;: {
        &quot;given_name&quot;: &quot;John&quot;,
        &quot;surname&quot;: &quot;Doe&quot;
      },
      &quot;email_address&quot;: &quot;customer@example.com&quot;,
      &quot;payer_id&quot;: &quot;QYR5Z8XDVJNXQ&quot;
    },
    &quot;purchase_units&quot;: [
      {
        &quot;reference_id&quot;: &quot;d9f80740-38f0-11e8-b467-0ed5f89f718b&quot;,
        &quot;shipping&quot;: {
          &quot;address&quot;: {
            &quot;address_line_1&quot;: &quot;2211 N First Street&quot;,
            &quot;address_line_2&quot;: &quot;Building 17&quot;,
            &quot;admin_area_2&quot;: &quot;San Jose&quot;,
            &quot;admin_area_1&quot;: &quot;CA&quot;,
            &quot;postal_code&quot;: &quot;95131&quot;,
            &quot;country_code&quot;: &quot;US&quot;
          }
        },
        &quot;payments&quot;: {
          &quot;authorizations&quot;: [
            {
              &quot;id&quot;: &quot;0AW2184448108334S&quot;,
              &quot;status&quot;: &quot;CREATED&quot;,
              &quot;amount&quot;: {
                &quot;currency_code&quot;: &quot;USD&quot;,
                &quot;value&quot;: &quot;100.00&quot;
              },
              &quot;seller_protection&quot;: {
                &quot;status&quot;: &quot;ELIGIBLE&quot;,
                &quot;dispute_categories&quot;: [
                  &quot;ITEM_NOT_RECEIVED&quot;,
                  &quot;UNAUTHORIZED_TRANSACTION&quot;
                ]
              },
              &quot;expiration_time&quot;: &quot;2018-05-01T21:20:49Z&quot;,
              &quot;create_time&quot;: &quot;2018-04-01T21:20:49Z&quot;,
              &quot;update_time&quot;: &quot;2018-04-01T21:20:49Z&quot;,
              &quot;links&quot;: [
                {
                  &quot;href&quot;: &quot;https://api.paypal.com/v2/payments/authorizations/0AW2184448108334S&quot;,
                  &quot;rel&quot;: &quot;self&quot;,
                  &quot;method&quot;: &quot;GET&quot;
                },
                {
                  &quot;href&quot;: &quot;https://api.paypal.com/v2/payments/authorizations/0AW2184448108334S/capture&quot;,
                  &quot;rel&quot;: &quot;capture&quot;,
                  &quot;method&quot;: &quot;POST&quot;
                },
                {
                  &quot;href&quot;: &quot;https://api.paypal.com/v2/payments/authorizations/0AW2184448108334S/void&quot;,
                  &quot;rel&quot;: &quot;void&quot;,
                  &quot;method&quot;: &quot;POST&quot;
                },
                {
                  &quot;href&quot;: &quot;https://api.paypal.com/v2/payments/authorizations/0AW2184448108334S/reauthorize&quot;,
                  &quot;rel&quot;: &quot;reauthorize&quot;,
                  &quot;method&quot;: &quot;POST&quot;
                }
              ]
            }
          ]
        }
      }
    ],
    &quot;links&quot;: [
      {
        &quot;href&quot;: &quot;https://api.paypal.com/v2/checkout/orders/5O190127TN364715T&quot;,
        &quot;rel&quot;: &quot;self&quot;,
        &quot;method&quot;: &quot;GET&quot;
      }
    ]
  }
  </code></pre>
  <p>I tried to use in file for webhook:</p>
  <pre><code>$json = file_get_contents('php://input');
  $data = json_decode($json);
  </code></pre>
  <p>and  got a some info, which haven't amount, client account and etc. Could someone tell, how to do it with one php script without installing the api or tell me how to deploy api on my  server, so as the documentation is not enough to understand it how to do it?</p>