PayPal

GRATIS
Da Dmitry Shumytskyi | Aggiornamento एक महीने पहले | Payments
Popolarità

0.3 / 10

Latenza

127,265ms

Livello di servizio

0%

Health Check

N/A

Torna a tutte le discussioni

PHP source code

Rapid account: Saids
saids
7 वर्ष पहले

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

Partecipa alla discussione - aggiungi un commento di seguito:

Accedi/Iscriviti per pubblicare nuovi commenti