Generate pkay and ticket