function uc_recurring_product_uc_order in UC Recurring Payments and Subscriptions 7.2
Implements hook_uc_order().
File
- modules/
uc_recurring_product/ uc_recurring_product.module, line 443 - Add recurring payments/fees to a product. This is imlpemented through Ubercarts product features.
Code
function uc_recurring_product_uc_order($op, $order, $arg2) {
switch ($op) {
// TODO: Allow admin to create a recurring order from "create order" page.
case 'submit':
if (variable_get('uc_recurring_checkout_process', TRUE)) {
//reload order to capture uid in case checkout was anonymous
$order = uc_order_load($order->order_id);
if (uc_recurring_product_process_order($order) === FALSE) {
return array(
array(
'pass' => FALSE,
'message' => t('Your order cannot be completed, because we could not process your recurring payment. Please review your payment details and contact us to complete your order if the problem persists.'),
),
);
}
}
break;
}
}