Table of Contents
GetExpressCheckoutDetails Examples
Notes
none
Request
// Create instance of the phpPayPal class $paypal = new YipPayPal(); // Add the token (stored from the SetExpressCheckout call) to the class before we make the call $paypal->token = $USER_SESSION->token; // Make the request $paypal->GetExpressCheckoutDetails(); // Store the payer_id - you will need this to complete the transaction $_SESSION['payer_id'] = $paypal->payer_id;
For more information on field descriptions, requirements and corresponding PayPal fields, see the parameters list.
Required Fields
token
Optional Fields
- none
Response
The class instance will always provide the raw PayPal response to the Response array. During testing (sandbox mode), you can simply output the value of Response to see the PayPal response.
$paypal->Response; // Display the response print_r($paypal->Response);
Success Response
If the transaction was successful, PayPal will return the following values:
tokenemailpayer_idpayer_statussalutationfirst_namelast_namemiddle_namesuffixcountry_codebusinessshipping_nameshipping_address1shipping_address2shipping_cityshipping_stateshipping_country_codeshipping_postal_codeshipping_phone_numberaddress_statuscustominvoice
Error Response
If there was an exception with the interaction with PayPal, _error will return true.
See the error documentation for details about error return values and procedures.
code/classes/phppaypal/examples/getexpresscheckoutdetails.txt · Last modified: 2008/03/02 23:09 (external edit)