tomtao007
tomtao007

Reputation: 3

my server call v2/checkout/orders/ paypal sandbox return 404 Not Found

1: i used ios client create a order, get response as below

CurrencyCode: USD

Amount: 21.47

Short Description: Hipster clothing

Intent: sale

Processable: Already processed

Display: $21.47

Confirmation: {

client =     {

    environment = sandbox;

    "paypal_sdk_version" = "2.18.1";

    platform = iOS;

    "product_name" = "PayPal iOS SDK";

};

response =     {

    "create_time" = "2019-12-16T12:12:48Z";

    id = "PAYID-LX3XJQI4U759055JE198303J";

    intent = sale;

    state = approved;

};

"response_type" = payment;

}

Details: Subtotal: 12.98, Shipping: 5.99, Tax: 2.5

Shipping Address: (null)

Invoice Number: (null)

Custom: (null)

Soft Descriptor: (null)

Payee email: (null)

BN code: (null)

Item: '{1|Old jeans with holes|4.99|USD|Hip-00037}'

Item: '{1|Free rainbow patch|0.00|USD|Hip-00066}'

Item: '{1|Long-sleeve plaid shirt (mustache not included)|7.99|USD|Hip-00291}'

2: i can see transaction in https://developer.paypal.com/developer/notifications/

sb-g8ehg personal example

Receipt for Your Payment to Doe John

16 De[Removed. Phone #s not permitted]/td>

3: my server side want to get payment details , but 404

curl -v -X GET https://api.sandbox.paypal.com/v2/checkout/orders/PAYID-LX3XJQI4U759055JE198303J -H "Content-Type: application/json" -H "Authorization: Bearer A21AAHMxaNfgH67r9uGcKMtCHHMo-VDQHf4WGBEZIbzEtBo7_bSMXArvTYGEUub_gT3s2_XRCJJNbgdXTd9mmZiANBs2URVUg"

Note: Unnecessary use of -X or --request, GET is already inferred.

GET /v2/checkout/orders/PAYID-LX3XJQI4U759055JE198303J HTTP/1.1

Host: api.sandbox.paypal.com

User-Agent: curl/7.54.0

Accept: /

Content-Type: application/json

Authorization: Bearer A21AAHMxaNfgH67r9uGcKMtCHHMo-VDQHf4WGBEZIbzEtBo7_bSMXArvTYGEUub_gT3s2_XRCJJNbgdXTd9mmZiANBs2URVUg

>

< HTTP/1.1 404 Not Found

< Cache-Control: max-age=0, no-cache, no-store, must-revalidate

< Content-Length: 385

< Content-Type: application/json

< Date: Mon, 16 De[Removed. Phone #s not permitted]GMT

< Paypal-Debug-Id: d59bbbad78a81

<

{"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":"d59bbbad78a81","links":

Upvotes: 0

Views: 2067

Answers (1)

Preston PHX
Preston PHX

Reputation: 30379

It does not appear the SDK you are using implements v2/checkout/orders, and so when you request that PAYID it is 404 Not Found

Perhaps that SDK implements v1/payments or v2/payments instead

Upvotes: 0

Related Questions