GetCheckoutDetails Method
Returns information about the customer, including name and address on file with PayPal.
Syntax
expresscheckout.getCheckoutDetails([callback])
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for this method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
After the customer pays via PayPal and is returned to your ReturnURL, use this method (along with the token returned in the ReturnURL query string) to retrieve payment details about this transaction. After calling this method, all of the fields under the Payer and Payment properties will be populated. Note that PayPal will only return these values if it has this information stored for the paying customer. The PayerId property is required to finalize the sale, but you may want to check other Payer and Payment details to make sure they are correct.
If everything looks good, you may then call CheckoutPayment to complete the transaction.