Those three points you listed is what LinkLok does (so far as I know), so I don't think there's any advantage in reinventing the wheel here. And it's easy to do refunds from that point with PayPal.
If you really want to do it yourself, you could study the LinkLok code to see how they do it. But in the end, you'll presumably end up with pretty much the same thing.
Anyhow, the aim of the forums is to help you with a coding problem, rather than to teach you how to do the whole thing or do it for you (which is what service providers are for). Perhaps make a start, see how far you can get, and then ask for some specific help.