You are here

function uc_recurring_authorizenet_cim_process in UC Recurring Payments and Subscriptions 7.2

Same name and namespace in other branches
  1. 6.2 includes/uc_recurring.uc_authorizenet.inc \uc_recurring_authorizenet_cim_process()

Set up the recurring fee by creating a CIM profile for future payments

Parameters

$order: The order object.

$fee: The fee object.

Return value

TRUE if recurring fee setup

1 string reference to 'uc_recurring_authorizenet_cim_process'
uc_recurring_uc_authorizenet_recurring_info in includes/uc_recurring.uc_authorizenet.inc
Implements hook_recurring_info().

File

includes/uc_recurring.uc_authorizenet.inc, line 55
Uc recurring implementation for the test gateway module.

Code

function uc_recurring_authorizenet_cim_process($order, &$fee) {
  $fee->fee_handler = 'authorizenet_cim';
  if (variable_get('uc_authnet_cim_profile', FALSE) == FALSE) {
    $data = array(
      'txn_type' => UC_CREDIT_REFERENCE_SET,
    );
    return uc_authorizenet_charge($order->order_id, $order->order_total, $data);
  }
  return TRUE;
}