In uc_payment.module, line: 457 uc_payment_enter(..) there is a call to uc_cart_complete_sale($order);

uc_payment.module does not list uc_cart as a dependency, and to be fair - it shouldn't necessarily be dependent. For example, we are using the order module to proxy transactions through another gateway without using the cart.

I propose the following change:

   $order = uc_order_load($order_id, TRUE);
   $account = user_load($uid);
    
  // Ensure user has an account before payment is made.
  
  if (module_exists("uc_cart")){
      uc_cart_complete_sale($order);
  }

Comments

southweb’s picture

Issue summary: View changes

cart -> uc_cart

tr’s picture

Version: 7.x-3.0 » 7.x-3.x-dev
Category: bug » feature
tr’s picture

Issue summary: View changes

add code tag

longwave’s picture

southweb’s picture

thanks for this. I see the link you refer to also raises the dependency issue, so hopefully an elegant solution will be found.

longwave’s picture

Status: Active » Fixed

Committed the original suggestion of adding a module_exists() check.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Modified - we need order and account variables!