You are here

function _commerce_cardonfile_capable_payment_methods in Commerce Card on File 7.2

Returns all payment methods that are card on file capable

Return value

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

1 call to _commerce_cardonfile_capable_payment_methods()
commerce_cardonfile_payment_method_implements in ./commerce_cardonfile.module
Returns all payment method instances that implement a specific callback

File

./commerce_cardonfile.module, line 1410
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_methods() {
  $capable_methods = array();
  $payment_methods = commerce_payment_methods();
  foreach ($payment_methods as $method_id => $payment_method) {
    if (_commerce_cardonfile_capable_payment_method_check($payment_method)) {
      $capable_methods[$method_id] = $payment_method;
    }
  }
  return $capable_methods;
}