I am using ubercart 2.7 and Google Checkout as one of the ways through which to process payments. I have everything set up so that GCO retrieves the shipping rates from ubercart but when the ubercart order is created there is no line item for shipping.

According the the Google Checkout API documentation, there are multiple sub-categories which can contain shipping information depending on how it was calculated (https://developers.google.com/checkout/developer/Google_Checkout_XML_API...).
These are not accounted for in either the v2.7 or current (2.9) uc_google_checkout module.

Comments

bjcone’s picture

This patch includes handling for the carrier-calculated and merchant-calculated shipping sub-categories when GCO returns the order to be created/stored by uc_order.

drupalove’s picture

The google checkout carrier-calculated and merchant-calculated shipping patch has not been applied to Drupal 7 Ubercart 3.x-dev.

In my case nothing was recorded in the table uc_order_line_items and the log file showed General error: 1366 Incorrect decimal value. And the XML notification looked like this:
<merchant-calculation-successful>false</merchant-calculation-successful>

Without longwave I wouldn't know this patch exists, also thanks to TR who has been following up with my problem and to bjcone for sharing this patch.

longwave’s picture

Yes, the patch has not been applied, that is why this issue is still "needs review" and not "fixed".

So with this patch in place, is Google Checkout working for you now? (fixing #1632372: order notification failing)

drupalove’s picture

@longwave after applying this patch, for the first time I received an order through google checkout last night which was recorded fully on the website. Definitely the patch solved my problem and I think it should be applied at least to the dev version. You are genius! Thank you so much.

drupalove’s picture

Just want to update you with the situation after applying the patch to Drupal 7 Ubercart 3.x-dev.

1) the first 2 orders were recorded successfully.

2) the 3rd order contained 3 products, but each one was recorded twice. The buyer sent an email saying the invoice was wrong.

3) the 4th order was recorded successful, but google has been trying to re-send the notification for the same order (302) thinking it was not recorded. This resulted in the following error:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '302' for key 'PRIMARY': INSERT INTO {uc_gc_orders} (order_id, gc_order_number, gc_total) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => SimpleXMLElement Object ( [0] => 302 ) [:db_insert_placeholder_1] => SimpleXMLElement Object ( [0] => 301569524203236 ) [:db_insert_placeholder_2] => SimpleXMLElement Object ( [@attributes] => Array ( [currency] => GBP ) [0] => 19.18 ) ) in uc_google_checkout_new_order() (line 929 of /home/xxxxxxx/public_html/sites/all/modules/ubercart/payment/uc_google_checkout/uc_google_checkout.module).

4) I updated Ubercart with the 5 July release as soon as it came out. Since then google has been giving Send failed with code: 500 whenever a buyer attempts checkout. I realised today the patch was wiped off. I applied it again today.

If it works I expect to see again duplicate products on invoice and the repeated notification problem.

I hope this helps progress the review and help find a solution to my problem. Will keep you updated.

longwave’s picture

Status: Needs review » Fixed

Committed #1 to both branches. The -dev release will update tomorrow with this patch included. If you are still having issues after this, please open a new bug report.

Status: Fixed » Closed (fixed)

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