PayPal

KOSTENLOS
Durch Dmitry Shumytskyi | Aktualisiert 9 days ago | Payments
Popularität

3.8 / 10

Latenz

127,261ms

Service Level

0%

Health Check

N/A

Zurück zu allen Diskussionen

PHP source code

Rapid account: Saids
saids
7 years ago

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”))
]);

Nehmen Sie an der Diskussion teil - fügen Sie unten einen Kommentar hinzu:

Anmelden / Registrieren, um neue Kommentare zu veröffentlichen