Forum Moderators: buckworks

Message Too Old, No Replies

paypal, two form actions

         

MWpro

1:08 am on Oct 27, 2007 (gmt 0)

10+ Year Member



I have a few products that I want to sell with the ease of a simple database to modify paypal's code to change the price/description for each item.

However, I need inventory management, so I want to have a value for each product with the quantity that I have for that item, and after that quantity has been sold, it no longer shows up.

The form action currently goes to: paypal.com/cgi-bin/webscr which retrieves the variables; is there anyway I can have two form actions (one going to paypal, one in which it subtracts 1 from the quantity of the item), or make it go to the subtraction form action first and then to paypal while still preserving the values?

(sorry if this is in the wrong forum).

limoshawn

1:29 am on Oct 27, 2007 (gmt 0)

10+ Year Member



I think you would be best to use paypal IPN to triger a script on your server to update the database after the payment is completed. Works for me.

MWpro

4:12 pm on Oct 27, 2007 (gmt 0)

10+ Year Member



This sounds like exactly what I need. Can you recommend any good tutorials to teach me more about this?

Thanks!

limoshawn

5:42 pm on Oct 27, 2007 (gmt 0)

10+ Year Member



I'll assume that you already have the code for updating your inventory database. PayPal's ipn documentation is at the link below.

[paypal.com...]

include your inventory update script in the page that paypal uses to notify your server with the ipn info.