API call to retrieve transaction - errors getting "Specified resource ID does not exist"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
We have a webhook receiving paypal transaction information. Our webhook immediately decodes the payload, and calls the PayPal API to retrieve the transaction associated with the webhook message.
We are now seeing in about 20% of the calls, in production, the error message "Specified resource ID does not exist"
Can someone please suggest a solution?
Thanks
Nick
We are using the PayPal SDK to create a PayPalHTTPClient
private function _getPayPalClient() {
$clientId = $this->getClientId();
$clientSecret = $this->getSecretKey();
if($this->isLive() == true) {
error_log('creating production environment: '.$clientId.', '.$clientSecret);
$environment = new ProductionEnvironment($clientId, $clientSecret);
} else {
error_log('creating sandbox environment: '.$clientId.', '.$clientSecret);
$environment = new SandboxEnvironment($clientId, $clientSecret);
}
return new PayPalHttpClient($environment);
}
public function getTransaction($transactionId)
{
$client = $this->_getPayPalClient();
try {
Log::Info(__FILE__,__METHOD__,', fetching paypal transaction id: '.$transactionId);
$response = $client->execute(new OrdersGetRequest($transactionId));
Log::Info(__FILE__,__METHOD__,', paypal transaction response: '.print_r($response,true));
return $response;
} catch (Exception $ex) {
Log::Info(__FILE__,__METHOD__,', paypal transaction fetch error: Exception: '.$ex->getMessage());
return false;
}
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Pending Transaction - CLearly Declined by Merchant in PayPal Payments Standard
- We're not currently set up for transactions in India. in PayPal Payments Standard
- Issue with Empty store_info in Response Using /v1/reporting/transactions on Sandbox API in REST APIs
- Add Others data in SDKs
- IPN works in sandbox but not live in Sandbox Environment