I have a custom module which does many things including selling keywords for people to use in communication campaigns. The module checks to see if a keyword is available and then if so, programatically creates a uc_recurring_subscription product type and redirects them to the payment page so they can setup their recurring subscription. It enters details into a custom database table with the keyword being marked as 2 which means Pending.
However some essential information doesn't' get created when the uc_recurring_subscription product node is programatically created. The information about features isn't there. I don't actually know what node->variable/s to use to create this feature information.
Here is what I'm using to create the node - I know I'm missing some information but can't figure out what. I want the order to recur every month indefinitely for the same price as $node->sell_price.
$node = new stdClass();
//Main Node Fields
$node->name = "Monthly Keyword Subscription for Keyword $kw";
$node->title = $node->name;
$node->body = "Information Displayed on the Page ";
$node->type = 'uc_recurring_subscription'; //This can be any node type
$node->created = time();
$node->changed = $node->created;
$node->promote = 0; // Display on front page ? 1 : 0
$node->sticky = 0; // Display top of page ? 1 : 0
$node->format = 2; // 1:Filtered HTML, 2: Full HTML
$node->status = 1; // Published ? 1 : 0
$node->language = 'en';
$node->uid = $account->uid;
$node->list_price = 10.00000;
$node->cost = 0.00000;
$node->sell_price = 10.00000;
$node->path = $path; //previously specified
//Custom Information Fields
$node->field_group['value'] = $group;//the group the keyword is linked to
$node->model = $kw; //we are using the sku field for the keyword.
if ($node = node_submit($node))
drupal_set_message(t('Automatic Setup Succeeded - Please Setup Your Payment.'));
drupal_set_message(t('Automatic Setup Failed - Please contact firstname.lastname@example.org'));