If commerce_cardonfile is enabled and the Authorize.Net AIM Credit Card method is enabled, the option to save the credit card information is always presented to the user. However, if the "Enable Card on File functionality with this payment method using Authorize.Net CIM" option is disabled on the payment method the card will not actually be saved.

If this option is disabled, the option to save the credit card information should not be displayed to the user. Since commerce_cardonfile has no way to tell that the option was not enabled on the payment method instance, commerce_authnet should be responsible for altering the form and removing the option.

Patch forthcoming.

Comments

BassistJimmyJam’s picture

Status: Active » Needs review
StatusFileSize
new2.48 KB

The attached patch implements hook_form_alter() to remove the cardonfile storage option at checkout if the payment method is authnet_aim and cim_cardonfile is disabled. It also implements hook_module_implements_alter() to ensure that commerce_authnet_form_alter() runs after commerce_cardonfile_form_alter().

dwkitchen’s picture

Project: Commerce Authorize.Net » Commerce Card on File

This is an issue with Card on File not the payment gateway.

bojanz’s picture

Issue summary: View changes
Status: Needs review » Needs work

@dwkitchen
Which fix did you have in mind?
CoF adding its own "enable CoF" checkbox to each payment method?

bdlangton’s picture

Just updating patch #1 as 'cim_cardonfile' is now 'cardonfile'.

torgospizza’s picture

@bdlangton: You have updated the patch for Commerce Authnet but dwkitchen's comment in #2 suggests this is actually an issue with Commerce CoF.

Can someone shed some light on this? I believe we may be running into this issue with CoF using Stripe, but am unsure of a path forward.