Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Not sure yet if it's just me or if it's really a bug in Ubercart. (or a new behaviour for Ubercart 2.x)
According to the Ubercart 1.x documentation (http://www.ubercart.org/docs/developer/3567/cartdetails) on callback for payment method with op 'cart-details' I should receive the current order as arg1.
This works for me with op 'cart-review' but with op 'cart-details' arg1 gives me NULL.
Comments
Comment #1
xibun CreditAttribution: xibun commentedsome progress in my understanding:
in uc_payment.module - function uc_payment_get_details the order cannot be loaded in checkout until the "Review order" button has been clicked.
But at the same time there are details like order total etc. on the checkout page. These probably come from the current cart and the actual order hasn't been built yet?
So why are we trying to send the order in arg1 with op 'cart-details'? (use example would be interesting)
Would it make more sense to send the cart instead?
Comment #2
rszrama CreditAttribution: rszrama commentedNope, we send in the order object b/c it's intended to pass in the values if the user hits back from the review page as you discovered. If you want a good example of a payment method, you can check out my recent http://drupal.org/project/uc_echecknet. Future development support requests would best be directed to our support forums.