You are here

function _commerce_cardonfile_capable_payment_method_check in Commerce Card on File 7.2

Returns TRUE if a payment method is capable of card on file

Parameters

$payment_method: An associative array of payment method objects keyed by the method_id.

Return value

TRUE if payment method is capable of card on file

3 calls to _commerce_cardonfile_capable_payment_method_check()
commerce_cardonfile_form_alter in ./commerce_cardonfile.module
Implements hook_form_alter().
commerce_cardonfile_form_commerce_payment_order_transaction_add_form_alter in ./commerce_cardonfile.module
Implements hook_form_FORM_ID_alter().
_commerce_cardonfile_capable_payment_methods in ./commerce_cardonfile.module
Returns all payment methods that are card on file capable

File

./commerce_cardonfile.module, line 1431
Supports card on file functionality for credit card payment methods by associating card data reference IDs from payment gateways with user accounts.

Code

function _commerce_cardonfile_capable_payment_method_check($payment_method) {
  return !empty($payment_method['cardonfile']) ? $payment_method['cardonfile'] : FALSE;
}