PayPal

GRATIS
Door Dmitry Shumytskyi | Bijgewerkt לפני 8 ימים | Payments
Populariteit

3.3 / 10

Latency

127,261ms

Serviceniveau

0%

Health Check

N/A

Terug naar alle discussies

PHP source code

Rapid account: Saids
saids
hace 7 años

Hi,

I tried to test your source code for PHP in my local environment. I compose package successfully. And when I try to test code to get access token I got an error realted to body.Add(new DataParameter(). It says “Use of undefined constant body - assumed ‘body’”.

Source is:

require DIR . ‘/vendor/autoload.php’;
use RapidApi\RapidApiConnect;

$rapid = new RapidApiConnect(‘APP_CREDENTIALS’, ‘APP_ID’);

$result = $rapid->call(‘PayPal’, ‘getAccessToken’, [
body.Add(new DataParameter(“clientId”, “CLIENT_ID_HERE”)),
body.Add(new DataParameter(“secret”, “SECRET_KEY_HERE”)),
body.Add(new DataParameter(“grantType”, “client_credentials”)),
body.Add(new DataParameter(“sandbox”, “1”))
]);

Doe mee aan de discussie - voeg hieronder een opmerking toe

Log in / Schrij u in om nieuwe opmerkingen te plaatsen