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
transaction_id
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);
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:
receiver_businessreceiver_emailreceiver_idemailpayer_idpayer_statusfirst_namemiddle_namelast_namepayer_businessshipping_country_codesalutationsuffixaddress_owneraddress_statusshipping_cityshipping_nameshipping_phone_numbershipping_postal_codeshipping_stateshipping_address1shipping_address2parent_transaction_idtransaction_idreceipt_idtransaction_typepayment_typeorder_timeamount_totalamount_feeamount_settleamount_taxexchange_ratepayment_statuspayment_pending_reasonpayment_reason_codeinvoicecustomnoteamount_sales_tax-
namenumberquantityamount_taxamount
subscription_idsubscription_dateeffective_dateretry_timeuser_namepasswordrecurrencesreattemptrecurringperiodbuyer_idclosing_datemultiitem
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.