Refator code, include authorize and capture methods