No email_address returned in query of order ID after successful purchase
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using this code to query Paypal for customer details after a successful payment but no email_address is returned as part of the request.
This is the code:
OrdersGetRequest request = new OrdersGetRequest(orderId); //3. Call PayPal to get the transaction HttpResponse<Order> response = client().execute(request); //4. Save the transaction in your database. Implement logic to save transaction to your database for future reference. System.out.println("Full response body:"); System.out.println(new JSONObject(new Json().serialize(response.result())).toString(4)); }
Print out:
"payer": {
"address": {"country_code": "US"},
"name": {
"surname": "Name",
"given_name": "Some"
},
"payer_id": "W7HYR5L2TYQEN"
},
There is not email_address returned as part of this request - where or how do I get that?
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- My webhook stopped working 2 weeks ago in REST APIs
- Payment not automatically being captured, funds not transferred in Sandbox Environment
- Paypal Payment method not saved in PayPal Payments Standard
- Integration options that include a redirect to the PayPal website for payment processing in REST APIs
- Permission denied with advanced hosted fields checkout in Sandbox Environment