function uc_payment_form_uc_cart_view_form_alter in Ubercart 7.3
Same name and namespace in other branches
- 8.4 payment/uc_payment/uc_payment.module \uc_payment_form_uc_cart_view_form_alter()
Implements hook_form_FORM_ID_alter() for uc_cart_view_form().
Adds express buttons for enabled payment modules directly to the cart page.
File
- payment/
uc_payment/ uc_payment.module, line 108
Code
function uc_payment_form_uc_cart_view_form_alter(&$form, &$form_state) {
$methods = _uc_payment_method_list();
foreach ($methods as $id => $method) {
if ($method['checkout'] && isset($method['express']) && ($express = $method['express'](array(), $form_state))) {
$form['actions']['checkout'][$id] = $express;
}
}
}