Commerce Card on File provides an API and user interface for storing and reusing credit card data on subsequent orders within Drupal Commerce. The module does not retain full card numbers locally but instead stores the remote ID of the full card data from the payment gateway used to validate and process your credit card transactions. This means card on file data will only be good for a single payment gateway; if you change payment gateways or accounts, your stored card data may no longer be usable.
Sponsored by Commerce Guys.
What is stored?
For identification purposes, the Card on File module retains the following card data:
- Card type
- Cardholder name
- Last 4 digits of the credit card number
- Numeric expiration month and year
This information will be visible within user account pages where users manage their stored credit card data and on payment forms where users have the option of paying via a card on file.
How can I use it?
There's a great Commerce Module Tuesday Commerce Card on File Video.
This module must be used in conjunction with a supporting payment method module to have any effect. Payment method modules seeking to integrate Card on File support should refer to the (forthcoming) developer documentation or view the Commerce Authorize.Net module's CIM integration for an example.
Card on File 2.x
Card on File 2.x converts the stored card data to entities. This has changed the API used by payment gateways, if you want to use this version you will also need to upgrade you Payment Gateway module.
Payment Gateways enabled for Card on File 2.x
Use with Commerce Recurring Framework
To use with Commerce Recurring Framework 2.x add the Charge Card action inside the loop in the create orders from recurring entities reaction rule.