Fix Paypal IPN code to work on sandbox and live environemnts.