You are here

function uc_recurring_payment_method_supported in UC Recurring Payments and Subscriptions 6.2

Same name and namespace in other branches
  1. 7.2 uc_recurring.module \uc_recurring_payment_method_supported()

Checks that a payment method can process recurring fees. This is done by checking that a recurring fee handler exists for the payment method.

Parameters

$payment method: The id of the payment method.

Return value

TRUE is a valid fee handler for this payment method is found.

2 calls to uc_recurring_payment_method_supported()
uc_recurring_payment_form in ./uc_recurring.admin.inc
Recurring payment settings form.
uc_recurring_product_form_uc_cart_checkout_form_alter in modules/uc_recurring_product/uc_recurring_product.module
Implementation of hook_form_FORM-ID_alter().

File

./uc_recurring.module, line 720
Allows you to add a recurring fee to a product/SKU to handle subscription type services.

Code

function uc_recurring_payment_method_supported($payment_method) {
  $info = uc_recurring_get_recurring_info();
  if (isset($info[$payment_method]['fee handler'])) {
    return !empty($info[$info[$payment_method]['fee handler']]);
  }
  return FALSE;
}