I'm trying to fetch Subscription details by its Subscription ID, but i'm unable to get it. It raised this error: {"name":"INVALID_RESOURCE_ID","message":"INVALID_RESOURCE_ID","information_link":"https://developer.paypal.com/docs/api/orders/v1/#error-INVALID_RESOURCE_ID","debug_id":"9fc43dc5ea630"}
Below is my code:
$accessToken='A21AAEk8KaihyonOUmmnSsx_2MLCXocZIMHjRxJreQtQ8Tck7fpxC_Q17u-OPRlnAdYWHRRwbiz-hLfBlbOJj_7SwOYVDoOaw';
$curl = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sandbox.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G");
curl_setopt($curl, CURLOPT_POST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Authorization: Bearer ' . $accessToken,
'Accept: application/json',
'Content-Type: application/json'
));
$response = curl_exec($curl);
$result = json_decode($response);
print_r($response);
[![Error Screenshot][1]][1]
[1]: https://i.stack.imgur.com/xcvlW.png