Reputation: 823
I'm currently building a simple ecommerce site for a client that will use solely Paypal to take payments. I want to display orders in the CMS I'm building for them, but only transactions that are made on the site I'm building.
I have achieved this so far by using the Paypal IPN to add transactions from the site into a database table (just the transaction id) and then borrowing heavily from the TransactionSearch.php file that Paypal supply with the API.
My concern is that at the moment, I'm fetching every transaction from the account (even ones not attributed to this site) and then filtering them by matching them against an array and only displaying the ones that are stored in the DB. It would be better if I could send the array I have through to Paypal and just receive those transactions - does any body know if that is possible?
The system works as is but I would prefer to make it more efficient if possible.
Thanks
Upvotes: 1
Views: 511
Reputation: 19356
I'd say a foreach with the GetTransactionDetails API should do the trick?
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_GetTransactionDetails
Upvotes: 2