Refactored the redirect_url function as the implementation for every payment type was exactly the same