Payments library for handling behind-the-scenes payments with various gateways