[support] Creating Billing information and Payment Method tab in My Account Section

Abhishek Anand fly2abhishek at gmail.com
Mon Apr 26 07:23:16 UTC 2010


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;
  }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20100426/fa2cc4a8/attachment-0001.html 


More information about the support mailing list