It is really pretty simple, so either page would work. Just go with listener.php. To do an insert or update you would just apply the insert record server behavior with the "always" trigger on the page and move the code down to line 60 so it only runs on approved orders.
I'm not sure if you have to do the insert first and update to pending, or just do an insert on the ipn page directly. Usually if you are dealing with a single item, then you can just do an insert on the IPN page to decrease complexity.
If you don't have all the information you need for the insert on the IPN page returned from paypal (there are a lot of POSTED fields to choose from), then you can pass a few more using a hidden field named "custom" that will be passed through to the ipn page.
If you want direct help, give me a call and I can do it in a screen share. Should only take an hour or so.