Payment library for card transactions