Table of Contents

GetTransactionDetails Examples

Notes

Request

// Create instance of the phpPayPal class
$paypal = new phpPayPal();
 
 
// Set the transaction_id (required)
$paypal->transaction_id = '9KA25373R3947621C';
 
// Perform the payment
$paypal->GetTransactionDetails();

For more information on field descriptions, requirements and corresponding PayPal fields, see the parameters list.

Required Fields

Optional Fields

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);

If the GetTransactionDetails method was successful, the _error variable will be set to false. This includes a Success With Warning response from PayPal. Otherwise, if there was an exception (read: failure), this will be set to true.

Success Response

If the transaction was successful, PayPal will return the following values:

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/gettransactiondetails.txt · Last modified: 2008/03/02 23:09 (external edit)