I integrated PayPal Mobile Payments into my Application. That was no big deal. I have it set up that when a customer makes a purchase from my app the details are are posted to my server. No big deal either. But, for the life of me, I cannot get the PayPal transaction details. I see the details in the LogCat but No matter what I try I cannot grab anything. I know it has to be simple but I have been sitting here and every attempt is fruitless. I can get some of the details but not all. Any help would be appreciated. I didn't do anything Dramatic to the Code Posted on the PayPal developer site yet until I fully get the grasp of their SDK but here it is.

Where's the code that's actually supposed to get the pay_key?
–
323goAug 26 '13 at 18:23

Sorry about that. I have tried quite a few different things. I added the code that gave the Logcat error.
–
Ty JacobsAug 26 '13 at 18:57

You still need to navigate the DOM inside the JSON. I would expect your code to fail. Try this instead: confirm.toJSONObject().getJSONObject("proof_of_payment").getJSONObject("adaptiv‌​e_payment").getJSONObject("pay_key")
–
323goAug 26 '13 at 19:00

1 Answer
1

For production applications, you'll really want send the whole confirmation JSON to your server. There it can be parsed and the pay_key or payment_id can be used to get transaction details by querying the proper API. (See https://developer.paypal.com)

The security context given to a mobile device is more restrictive since the app will get installed on devices outside your control.