RESOURCE_NOT_FOUND issue in both sandbox and live

liman
Contributor
Contributor

Hi Paypal Team,

 

My team keep getting INVALID_RESOURCE_ID in response once a while when trying to get order using the checkout version 2 rest apis.

Example is the response; 

 

{"name":"RESOURCE_NOT_FOUND","details":[{"issue":"INVALID_RESOURCE_ID","description":"Specified resource ID does not exist. Please check the resource ID and try again."}],"message":"The specified resource does not exist.","debug_id":"a79a98a9b55c4","links":[{"href":"https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_RESOURCE_ID","rel":"information_link"..."}]}

 

Meanwhile the order id we are using was actually from paypal. We used this link ; https://developer.paypal.com/docs/checkout/integrate/#6-verify-the-transaction

The issue comes from  line , request = OrdersGetRequest(order_id) , order_id being the transaction id we get from paypal.

 

Can you please help?

 

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

SirVivor
New Community Member

Hi Paypal-Team,

I had exactly the same problem, in my case it was the examples, because there is used:

$ AuthorizationsCaptureRequest($authorizationId);

but after the first steps in your example it has to be

$request = new OrdersCaptureRequest($orderId);

 

This took me about 3 hours... The GitHub-Examples for the Checkout-PHP-SDK are really a mess.

Florian

View solution in original post

Login to Me Too
34 REPLIES 34

kajanthan
New Community Member

I'm also getting same issue. but it worked before one week. ( i have check client id and secrets). 

{"name":"RESOURCE_NOT_FOUND","details":[{"issue":"INVALID_RESOURCE_ID","description":"Specified resource ID does not exist. Please check the resource ID and try again."}],"message":"The specified resource does not exist.","debug_id":"b44913a6c553d","links":[{"href":"https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_RESOURCE_ID","rel":"information_link"..."}]}

Login to Me Too

rahul-dighe
PayPal Employee
PayPal Employee

Are you still facing an issue ? if you are can you please paste the debug_id":"b44913a6c553d" and the environment sandbox or live so we can help debug the issue. 

Senior Product Manager - PayPal Checkout API Product
Login to Me Too

rverderber
Contributor
Contributor

I think I have the same problem. I started to implement PayPal Checkout on a site we are developing. All the client code seems to be working fine. Here is the result I get back which I think means the order has been completed and captured 

 

{
"create_time": "2019-08-18T21:20:00Z",
"update_time": "2019-08-18T21:20:00Z",
"id": "7WM38203LM766873W",
"intent": "CAPTURE",
"status": "COMPLETED",
"payer": {
"email_address": "xxxxxx",
"payer_id": "K3J458A8L98E2",
"address": {
"country_code": "US"
},
"name": {
"given_name": "xxxx",
"surname": "xxxxx"
}
},
"purchase_units": [
{
"description": "Order 1000",
"reference_id": "default",
"invoice_id": "10002-042195",
"amount": {
"value": "10.50",
"currency_code": "USD"
},
"payee": {
"email_address": "xxxxxxxxxxxx",
"merchant_id": "xxxxxxxxxxxxx"
},
"shipping": {
"name": {
"full_name": "Robert <removed>"
},
"address": {
"address_line_1": "<removed>",
"admin_area_2": "San Jose",
"admin_area_1": "CA",
"postal_code": "95131",
"country_code": "US"
}
},
"payments": {
"captures": [
{
"status": "COMPLETED",
"id": "6U393904AL2708629",
"invoice_id": "10002-042195",
"final_capture": true,
"create_time": "2019-08-18T21:20:00Z",
"update_time": "2019-08-18T21:20:00Z",
"amount": {
"value": "10.50",
"currency_code": "USD"
},
"seller_protection": {
"status": "ELIGIBLE",
"dispute_categories": [
"ITEM_NOT_RECEIVED",
"UNAUTHORIZED_TRANSACTION"
]
},
"links": [
{
"rel": "self",
"method": "GET",
"title": "GET"
},
{
"rel": "refund",
"method": "POST",
"title": "POST"
},
{
"rel": "up",
"method": "GET",
"title": "GET"
}
]
}
]
}
}
],
"links": [
{
"rel": "self",
"method": "GET",
"title": "GET"
}
]
}
 
On the server I try to receive the order information and get an HTTP 404 error. I also tried in POSTMAN and get the following message 
 
{
"name": "RESOURCE_NOT_FOUND",
"details": [
{
"location": "path",
"issue": "INVALID_RESOURCE_ID",
"description": "Specified resource ID does not exist. Please check the resource ID and try again."
}
],
"message": "The specified resource does not exist.",
"debug_id": "480add2072fdf",
"links": [
{
"rel": "information_link",
"method": "GET"
}
]
}
 
Am I missing a step? I've been reading all the API documentation and all I read is the client call then validate using the REST link on the server. 
 
Thanks in Advance
 
Robert
 
 
Login to Me Too

rverderber
Contributor
Contributor

J replaced my Sandbox Credentials with Live credentials and everything works as I would expect. Is this just an issue with the sandbox?

Login to Me Too

rahul-dighe
PayPal Employee
PayPal Employee

I am having my engineers take a look - we will get back soon.

Senior Product Manager - PayPal Checkout API Product
Login to Me Too

neerajgeit
Contributor
Contributor

Any updates? I am getting the same problem, double check the client ID and Security key all is fine but still getting the same problem "Resource _NOT_Found",  "debug_id" is "64684278ed69e"

 

{"name":"RESOURCE_NOT_FOUND","details":[{"issue":"INVALID_RESOURCE_ID","description":"Specified resource ID does not exist. Please check the resource ID and try again."}],"message":"The specified resource does not exist.","debug_id":"64684278ed69e","links":[{"href":"https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_RESOURCE_ID","rel":"information_link"..."}]}

Login to Me Too

rahul-dighe
PayPal Employee
PayPal Employee

I think we know what you might be doing - it looks like you are using the "id" for the Capture (purchase_units.captures.id  instead of the "id" for the Order to look up the Order. 

 

Can you paste the response for Create Order / Capture Order and the URI you are using for Get Order and I should be able to point it out. 

Senior Product Manager - PayPal Checkout API Product
Login to Me Too

rverderber2
Contributor
Contributor

I'm sure I used the order id and not the capture id. I even copied and used the URL returned in the links array

 

In the above example I posted, the link I attempted to retrieve was 

 

"href""https://api.sandbox.paypal.com/v2/checkout/orders/7WM38203LM766873W",

 

Login to Me Too

rverderber2
Contributor
Contributor

I tried switching credentials back to my sandbox account and it did work this time. I don't think I changed anything else since I tried it last week. 

 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.