Hi!

Thanks for the module, I've been using it one year ago, works great :-)
However I've been trying to implement the recurring payment without luck. I'm using Drupal 6 and Ubercart 6.x-2.4.
I have a product with a recurring fee, it works great with PayPal. With credit card it works only the first time (just like any other regular product) but the next recurring payments are not processed (orders are created but as "pending" orders).
I've been trying to debug the error by forcing the payment from the admin interface. The problem is in the uc_usaepay.recurring.inc file, line 71:

function uc_usaepay_recurring_renew($order, &$fee) {
  if (!empty($order->data['cc_txns']['references'])) {
    $data = array(
      'txn_type' => UC_CREDIT_REFERENCE_TXN,
      'ref_id' => end(array_keys($order->data['cc_txns']['references'])),
    );
    $result = uc_usaepay_charge($order->order_id, $order->order_total, $data);

    if ($result['success'] == TRUE) {
      uc_payment_enter($order->order_id, $order->payment_method, $order->order_total, $fee->uid, $result['data'], $result['comment']);
      return TRUE;
    }
  }
  return FALSE;
}

The data['cc_txns']['references'] is empty, in fact all data['cc_txns'] is NULL. My "data" array contains only 4 fields:

certificate_code (empty string)
cc_data (the credit card encoded data)
recurring_fee (bool, true)
old_order_id (xxx)

Any idea of what's going on? Thanks in advance!

jordi

Comments

jordijoan’s picture

Well, I think the problem is that I forgot to check the "Always use USAePay customer database?" checkbox on the "Payment Gateways" tab (admin/store/settings/payment/edit/gateways). Thanks anyway :)

jordijoan’s picture

Unfortunately it's not working. I don't have any "cc_txns" field in the "data" column of the uc_orders db table. And I don't see any user data appearing on my merchant console. Any idea? Thanks

notasheep’s picture

+1 I'm having this issue as well.