There are a large number of open source hotspot software suites available. EasyHotSpot has an integrated billing system. I have not audited these applications and i have no idea how secure they are.
From a security perspective, "captive portals" break ssl pretty badly. Convergence, which is the Anti-MITM addon for firefox will detect captive portals as being a MITM attack. Which is true, it is a MITM attack thats trying to get money from you.
There is a fundamental flaw in all of these "pay to use" wireless networks in that they are authenticating paying customers via a MAC address. Unfortunately with wireless networks, the attacker can see every user's MAC address and just spoof their own.
Other security concerns are that non-paying customers should never be able to route packets to the open Internet. Sometimes these networks will route DNS traffic, and its possible to route IP over DNS. Or route IP over just about any other protocol (In fact I can't name a protocol above layer 1 that can't be used...).
A PHP remote file include vulnerability in your captive portal software could allow the attacker to gain access to the open Internet (as well as remote code execution on your box :-). SQL Injection should also be a concern as it could an attacker to authenticate as a paying customer.