Hi All,
My requirement is to save a user's billing information and Payment Method in the My Accounts section and use the information to collect money automatically from users credit card as soon as he user creates a node. I am trying to bring the Billing information and Payment methods on user/%/edit by implementing hook_user I created a new category payment and am trying to get the uc_cart_checkout_form on user/%/edit/payment section
Following is the code that I have tried but did not work, can anyone please help me identify what and where am I going wrong?
function custom_form_user($op, &$edit, &$account, $category = NULL) { switch ($op) { case 'form': if($category == 'payment') { $form_state = array(); $form = uc_cart_checkout_form(); return $form; } break; case 'categories': $output[] = array( 'name' => 'payment', 'title' => t('Payment Options'), 'weight' => 10, 'access callback' => 'user_access', 'access arguments' => array('access content'), ); return $output; break; } }