I've built a buy/sell/trade site, Its not launched yet but before I do launch I need to add in a PayPal IPN feature so users have to pay a small fee before their advert goes live!
But I've never used paypal IPN before and all the tutorials I can find are for things like premium memberships... So quite how I implement this is a bit 'messy' if you see what I mean.
You can view the site at http://www.airgunvillage.com/ if you wish. Like I said its still pre launch but I'm planning to put the first 500 users who advertise into a draw for a prize, at the half way point I want to turn on this paypal IPN so that it covers the cost... (hence I need it done now, not after launch)
My thoughts are I have 2 ways to do this:
Method 1 i use paypal IPN to update a 'paid' column in the adverts after advert has been uploaded by user.
PROBLEM: I'm going to have my advert table cluttered with adverts people have not paid for - I'm going to have my image folder with images that do not belong to live adverts.
GOOD: I can upload and go to a preview page then pay for the advert which would let people see what they are getting I suppose.
I suppose I could write a function to clear out unpaid adverts after 1 week or something...
Method 2 Advertise form sends all data through to paypal IPN listener, upon a successful payment data is uploaded.
PROBLEM: How to validate form, then send data to paypal. almost need two submits?
GOOD: No junk images, no junk advert DB files.
What would you do? and why?
many thanks :)