PayPal

무료
분류별 Dmitry Shumytskyi | 업데이트됨 vor 16 Tagen | Payments
인기

3.8 / 10

지연 시간

127,261ms

서비스 수준

0%

Health Check

N/A

모든 토론으로 돌아가기

PHP source code

Rapid account: Saids
saids
vor 7 Jahren

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

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입