Payment library for card transaction