No email_address returned in query of order ID after successful purchase

buddiadventure
Contributor
Contributor

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?

 

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.