Zahor - You're in luck, I've written a CIM module. Check it out in contrib if you're interested. 
Ryan - I've done some testing of the recurring module with the CIM module. It seems to work quite well, just using the default handler (no work for me to do!
) but I think I found a couple bugs and have a couple thoughts for you:
1) $method isn't defined in uc_recurring_charge. I think you can just replace it with 'credit' since that's the only option, right?
$func = $gateways[$keys[0]]['credit']; //EDIT from: $func = $gateways[$keys[0]][$method];
2) $order_id and $amount aren't defined in uc_recurring_charge either. Here's what I think the charge line should look like:
$result = $func($fee['order_id'], $fee['fee_amount'], NULL); //EDIT from: $result = $func($order_id, $amount, NULL);3) Your default handler works well with CIM (since CIM is just like charging a credit card normally, only the number isn't stored in your database) except for one line. In uc_recurring_recurring_fee you check that the payment method is 'credit'. In the CIM module I briefly change the payment method to 'cim' so that I can handle pre-orders / partial payments. What would you think about changing that line to:
if ($order->payment_method !== 'credit' && $order->payment_method !== 'cim') { //EDIT from: if ($order->payment_method !== 'credit')4) I noticed that you commented out part of this query:
$result = db_query("SELECT * FROM {uc_recurring_users} WHERE remaining_intervals > 0"); // AND next_charge <= %d", time());Was that just for testing, maybe?
5) I noticed that you're logging payments to the usual uc_payments table, which makes the order balance go negative. What do you think about using a new uc_recurring_payments table instead? There could be a pane or tab on the order page that shows those payments separately. Seems a little more intuitive...although a bit more work as well...
Hope that's helpful. I'll let you know if I come up with anything else.
Best,
Chad


Joined: 12/28/2007