Working Java example for direct payment