Closed (fixed)
Project:
Ubercart
Version:
7.x-3.x-dev
Component:
Payment
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Dec 2012 at 22:30 UTC
Updated:
15 May 2013 at 08:20 UTC
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
Comment #0.0
southweb commentedcart -> uc_cart
Comment #1
tr commentedComment #1.0
tr commentedadd code tag
Comment #2
longwaveThis is also related to #1669968: hook_uc_checkout_complete() is called outside of checkout process (when payment is entered)
Comment #3
southweb commentedthanks for this. I see the link you refer to also raises the dependency issue, so hopefully an elegant solution will be found.
Comment #4
longwaveCommitted the original suggestion of adding a module_exists() check.
Comment #5.0
(not verified) commentedModified - we need order and account variables!