transaction ajax half working