Here's a link to our wildlife and parks department that allows you to buy licenses online, though I don't know if an out of state license can be purchased that way. (if the link doesn't work, use KDWP as a search term). There is a toll free number at that link that you can call for information.
http://www.kdwpt.state.ks.us/news/License-Permits
A friendly note if you don't yet have a place to hunt--there's not much public land in Kansas. The KDWP does have the "walk in hunter access" program. Essentially they lease access from landowners. You can find the lands on an atlas at the website or pick one up in a sporting goods department. Some counties will have a lot, others not much at all.