Receive Paypal payment status as "DEAD"

I get below response when paying with PayPal using a card using credentials for the sandbox.

{ "client": { "environment": "sandbox", "paypal_sdk_version": "2.14.6", "platform": "Android", "product_name": "PayPal-Android-SDK" }, "response": { "create_time": "2017-01-31T08:12:40Z", "id": "PAY-*************", "intent": "sale", "state": "created" }, "response_type": "payment" } 

Then I tried to get the full information using the payment identifier, using the API call to access, and get the status "DEAD" in the response to the payment. Please check below answer

 { "id": "PAY-*************", "create_time": "2017-01-31T08:12:40Z", "update_time": "2017-01-31T08:13:22Z", "state": "DEAD", "intent": "sale", "payer": { "payment_method": "credit_card", "funding_instruments": [ { "credit_card": { "type": "visa", "number": "xxxxxxxxxxxx1111", "expire_month": "11", "expire_year": "2025" } } ] }, "transactions": [ { "amount": { "total": "2.00", "currency": "USD", "details": { "subtotal": "2.00" } }, "description": "New Product", "related_resources": [] } ], "links": [ { "href": "https://api.sandbox.paypal.com/v1/payments/payment/PAY-*************", "rel": "self", "method": "GET" } ] } 

Can someone help me understand why I get this? How to fix it?

+6
source share
1 answer

Finally, I got a solution. It's a little late to answer here, but this answer can save time for those who are still struggling.

The JSON below is returned by the Android SDK after making the payment, but we can see that its status has not yet been approved. If we use the payment search API ( https://api.sandbox.paypal.com/v1/payments/payment/PAY-************* ) to verify the payment, we will receive DEAD- status and there will be no transaction identifier.

 { "client": { "environment": "sandbox", "paypal_sdk_version": "2.14.6", "platform": "Android", "product_name": "PayPal-Android-SDK" }, "response": { "create_time": "2017-01-31T08:12:40Z", "id": "PAY-*************", "intent": "sale", "state": "created" }, "response_type": "payment" } 

Solution that worked for me

The problem was that I created a Business account in my sandbox, but I had to create a Business Pro account in the sandbox. After that, I got the approved status, and when I use the payment search API, I get all the necessary details.

+3
source

Source: https://habr.com/ru/post/1014583/


All Articles