3 way gateway payment functonality