The Commerce Card on File module provides an API with a user interface for storing and reusing credit card data on subsequent orders. This module didn't hold full card numbers locally. Instead of this it stores the remote ID of the full card data from the payment gateway that is used to validate and process your credit card transactions.
Now lets checkout some requirements based on the module. Commerce Card on File module requires the following modules:
This module is required by following modules.
- Card on File - Recurring
- Commerce Card on File Testing
To work the Commerce Card on File module, there should be an attached payment method, which implements the CIM API. In this, I'm using the Commerce Authnet payment method that is to provide Card on File payment support.
Commerce Card on File works by storing a reference to a credit card. It can then use that reference to recollect that credit card and create and charge new orders.
- Card type
- Cardholder name
- Last 4 digits of the credit card number
- Numeric expiration month and year
Many payment gateways support "card on file" functionality,that permit you to process an authorization or capture for a credit card and give you a token to perform follow-up transactions using that same card data. Such a transaction are referred to as a reference transaction and some of its examples are implementations being PayPal's reference transactions, Cyber Source's Managed Billing / subscriptions, or Authorize.Net's Customer Information Manager (CIM).
To solve the Drupal integration, we can use Commerce Card on File module, which does all this and more within Drupal Commerce, which works through payment method callbacks, allowing any payment module to implement the callbacks to integrate reference transactions through its payment gateway's API.