Search code examples
phppaypalpaypal-ipn

Paypal IPN to update 'units sold' on website


Sorry for the very basic nature of the question, but I've been searching for two days and I'm still not sure how to do this.

I've got a paypal cart/store set up. How do I leverage either paypal IPN or a third party service to identify one specific item of the three items I have for sale, and send me a notification that a copy has been purchased, and then update a counter on my original website?

Again, just suggestions or a guideline would be greatly appreciated - even to point me in the right direction. Thank you.


Solution

  • A basic guideline for you:

    I assume you would need to pick num_cart_items and loop throug possible item_nameX variables returned.

    You don't need to code anything to validate IPN, use some of these classes: http://www.micahcarrick.com/php-paypal-ipn-integration-class.html http://www.phpclasses.org/package/2249-PHP-Process-Paypal-payment-interactions.html