I am using the paypal android sdk 2.14.1. When I make the payment by the sdk, then it give the following response,
{
"response": {
"state": "approved",
"id": "PAY-9A140896UE325390DK5VK4KI",
"create_time": "2016-06-22T15:26:40Z",
"intent": "sale"
},
"client": {
"platform": "Android",
"paypal_sdk_version": "2.14.1",
"product_name": "PayPal-Android-SDK",
"environment": "sandbox"
},
"response_type": "payment"
}
But I want the full transaction details
So please anyone can give the suggestion how to get the transaction details. by payment id.
Note: I am using soap APIs.
I got the answer,
First of all we have to generate the access-Token by the client_id and secret,
curl -v https://api.sandbox.paypal.com/v1/oauth2/token \
-H "Accept: application/json" \
-H "Accept-Language: en_US" \
-u "client_id:secret" \
-d "grant_type=client_credentials"
After getting the access-Token I have to make another api call for getting the full transaction details,
curl -v -X GET https://api.sandbox.paypal.com/v1/payments/payment/Payment-Id \
-H "Content-Type:application/json" \
-H "Authorization: Bearer Access-Token"
After hitting this I will get the full transaction details.
For know more go to this link.
Send the payment id to server API as:
url -v -X GET https://api.sandbox.paypal.com/v1/payments/payment/Payment-Id \
-H "Content-Type:application/json" \
-H "Authorization: Bearer Access-Token"
for more details, check here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With