You would use your MySQLi Server Behaviors to create a login page so that you can keep track of the user. Then you can use the "custom" hidden form element to store that information which will be passed back tot the IPN page by Paypal. Then store the purchase details on the IPN page.