Issue
I have recently implement paypal mobile payment tutorial using following tutorial: http://androiddevelopmentanddiscussion.blogspot.com/2014/05/paypal-integration-in-android.html
and in response i get following information:
{
"response": {
"state": "approved",
"id": "PAY-1GM934738N157023RKR7OWYI",
"create_time": "2014-12-03T10:52:17Z",
"intent": "sale"
},
"client": {
"platform": "Android",
"paypal_sdk_version": "2.1.0",
"product_name": "PayPal-Android-SDK",
"environment": "sandbox"
},
"response_type": "payment"
}
{
"short_description": "Painting 1",
"amount": "8",
"intent": "sale",
"currency_code": "USD"
}
any one guide me how can i obtain transaction id and other information in mobile sdk? as i see payment from paypal mobile sdk id is different then the actual transaction id.
any help would be appreciated.
Solution
You can retrieve a payment resource using the payment ID returned by the SDK: https://developer.paypal.com/webapps/developer/docs/api/#look-up-a-payment-resource
Typically, this would be done from your server and not from the mobile device. The GET operation will require an access token generated using both your client_id and client_secret.
Updated links:
- getting a payment resource: https://developer.paypal.com/docs/api/payments/#payment_get
- REST authentication and headers: https://developer.paypal.com/docs/api/auth-headers/
Answered By - Matt Jacunski Answer Checked By - David Goodson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.