PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, November 22, 2022

[FIXED] How to obtain transaction id or other information in paypal mobile SDK

 November 22, 2022     android, paypal, paypal-mobile-sdk, paypal-sandbox     No comments   

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)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing