Note that there are some explanatory texts on larger screens.

plurals
  1. POUnexpected error when tyring to get the payment transactions of a user
    primarykey
    data
    text
    <p>I always get an error when tyring to get the payment transactions of a user.</p> <pre><code>{ "error": { "message": "An unexpected error has occurred. Please retry your request later.", "type": "OAuthException", "code": 2 } } </code></pre> <p>I tried several approaches:</p> <pre class="lang-php prettyprint-override"><code>// approach 1 $response = $app['facebook']-&gt;api('/'.$app['user']['fbUserID'].'/payment_transactions', 'GET', [ //'request_id' =&gt; $order['requestID'], 'access_token' =&gt; $app['fb.app_id'].'|'.$app['fb.app_secret'] ]); // approach 2 $url = 'https://graph.facebook.com/'.$app['user']['fbUserID'].'/payment_transactions?fields=id&amp;access_token='.$app['fb.app_id'].'|'.$app['fb.app_secret']; $ch = curl_init(); $options = [ CURLOPT_URL =&gt; $url, CURLOPT_RETURNTRANSFER =&gt; 1, CURLOPT_CONNECTTIMEOUT =&gt; 10, CURLOPT_TIMEOUT =&gt; 60, CURLOPT_HTTPHEADER =&gt; array('Expect:'), CURLOPT_CAINFO =&gt; DIR.'/vendor/facebook/php-sdk/src/fb_ca_chain_bundle.crt' ]; curl_setopt_array($ch, $options); $result = curl_exec($ch); curl_close($ch); // approach 3 // like 2 but with a fresh access token $appAccessToken = explode('=', file_get_contents('https://graph.facebook.com/oauth/access_token?client_id='.$app['fb.app_id'].'&amp;client_secret='.$app['fb.app_secret'].'&amp;grant_type=client_credentials'))[1]; </code></pre> <p>Even in the Graph API Explorer I get this error. Only if I use the commandline it works:</p> <pre><code>$ curl 'https://graph.facebook.com/........./payment_transactions?access_token=.......|.........' </code></pre> <p>The user is an test user which is also a payment tester and made successfull test-purchases. The Local Currency Payments Breaking Changes are disabled.</p> <p>What am I doing wrong?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload