Forum Moderators: buckworks

Message Too Old, No Replies

PayPal IPN woes & shopping cart

         

apauto

4:16 pm on Nov 24, 2010 (gmt 0)

10+ Year Member



Hi guys,

So I integrated Paypal IPN and it works great, I get an email everytime an order comes in, and I create a DB record.

One problem though is I get the same thing for refunds as well. How can I distinguish between a sale and a refund for IPN?

Also, does anyone know where I can download a script, open source or paid, that is basically a shopping cart w/o the store? I already have a store, I just want a new shopping cart that has all of the PayPal and GoogleCheckout already integrated so I can focus on other things. However, I want it to "plugin" with my existing store.

Thanks

PCInk

5:56 pm on Nov 24, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You need to check a field is sent to you called "payment_status" and check if that is set to "Completed" for basic PayPal payments. Another, less reliable way would be to check that the amount is larger than zero (refunds are negative on PayPal).

If you can get to the script it should be simple to insert an if command to check this and don't write to the database if isn't a payment.