3
votes

I have managed to complete a PayPal payment using the REST PHP API. However, I want to know how to cross reference the REST transaction with the PayPal web user interface.

On the REST side I have payment id (getID()) received before the transaction is approved. It looks like 'PAY-5BH83448XN85470XXXXXXXXXXX'.

After the transaction is approved, I receive back at my redirect URL three other pieces of information:

- success=true
- token=EC-51Y92978Mxxxxxxxx
- PayerID=4Q7YVxxxxxxxx

When I log into PayPal and review the payment, none of these IDs match up with what is shown. The details for the payment show a Unique Transaction ID like #4PP59868EXXXXXXXX that does not match anything above.

How do I cross reference these different pieces of data?

1
Are you saying that the transaction id returned in the API response does not match the transaction id you see in payment transaction details in the payee's account? - Dennis
The partial numbers I gave above are all from the same transaction. As you can see, none of them match. The PayPal account I reference above is the payee's account. In my developers dashboard there is a transaction id of 3WK932105XXXXXXXX that matches the payment ID. I guess my real question is where do I find the transaction ID in the response. It is not obvious. As you can see, none of these ID's match. - Chuck Watson
Did you find any solution for this ? I am having the same problem. Any information will be helpful - Choudhury A. M.

1 Answers

1
votes

The response to the payment call will contain a list of transactions, which contains a set of related resources. For a completed payment there will be a sale item, the id of the sale is the PayPal transaction id.

For ex (pseudo): payment.transactions[0].related_resources[sale].id

Sample here: https://developer.paypal.com/webapps/developer/docs/integration/direct/accept-credit-cards/