I have some Problem with PayPal billing-plans this is my code. $url='https://'.PPURL.'/v1/payments/billing-plans/'.$resultGetPlanURL['id'].'/';
$JSONrequest='[
{
"op": "replace",
"path": "/",
"value": {
"state": "ACTIVE"
}
}
]';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Authorization: Bearer '.$_SESSION['access_token']
));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $JSONrequest);
$result = curl_exec($ch);
$resultGetPlanActive = json_decode($result,true);
curl_close ($ch); The result i get is 'java.lang.NullPointerException'. The Billing Plan ID is right and the access_token too. Whats the problem? I don't use SDK.
... View more