Fix IPN for itemized purchases. Also fix gateway error logging. #1159