Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Tony Bolton 83 posts 109 karma points
    May 21, 2012 @ 17:37
    Tony Bolton
    0

    Google Checkout and missing shipping costs

    Hope someone can help.

    I appear to have a problem with the Google Checkout provider.

    The Order Total without shipping is £20, £10 shipping - OrderTotal property showing correctly £30. I can see this before I post through to Google, so I know the basket is fully updated.

    However as soon as I request payment via Google, it's missing the shipping completely and just showing the total, £20.

    This is for uCommerce 2.6 including the patch which contained the VAT rounding fix, which I believe is the latest version.

    Anyone any ideas?  I've tried to debug via Fiddler but for some reason I can't see the posted output to Google even with decryption on, so any ideas on that would be helpful to try and work out what's going on - hit a bit of a brick wall.

    Thanks,

    Tony

  • Tony Bolton 83 posts 109 karma points
    May 21, 2012 @ 20:25
    Tony Bolton
    0

    Incidentally Paypal is working fine.  I've looked at the way the Google message is constructed and can't see shipping items there, so it's almost as if it gets ignored altogether.  Anyone know if this is the case?

  • Tony Bolton 83 posts 109 karma points
    May 21, 2012 @ 23:47
    Tony Bolton
    1

    Seems I'm getting good at answering my own questions!  In the end pretty much confirmed shipping is being missed (unless anyone knows any different, please say).

    So, with uCommerce being as great as it is, I just extended the functionality - overrode the RequestPayment method in GoogleCheckoutPaymentMethodService to go through the order and apply the shipping.

    Here's the code I've added during the generation of the HTML post to Google.  Then I just followed the advice on adding custom payment providers, called it GoogleCheckoutWShipping, and job's a good 'un :

    foreach (Shipment method in paymentRequest.Payment.PurchaseOrder.Shipments)
    {
       dictionary.Add(string.Format("checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-{0}.name", count), method.ShippingMethod.Name);
       dictionary.Add(string.Format("checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-{0}.price", count), method.ShipmentTotal.ToString("0.00"));
       dictionary.Add(string.Format("checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-{0}.price.currency", count), paymentRequest.Payment.PurchaseOrder.BillingCurrency.ISOCode);
       count++;
    }


    Hope someone else finds it useful.

  • Søren Spelling Lund 1797 posts 2786 karma points
    May 22, 2012 @ 10:41
    Søren Spelling Lund
    0

    Awesome work, Tony.

    I'll add a work item to fix the Google Checkout provider.

  • Søren Spelling Lund 1797 posts 2786 karma points
    May 22, 2012 @ 13:13
    Søren Spelling Lund
    0

    Hi Tony,

    Digging into shipping and Google Checkout I decided to amend your code slightly to better match the way uCommerce does thing. The comments in code will tell you what's what:

    // Group all shipments together as Google Checkout doesn't support
    // supplying a "completed" shipment, but rather shipping methods.
    // Don't want to move calculation of shipping costs to Google Checkout.
    dictionary.Add(string.Format("checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-{0}.name", 1), "Shipping");
    dictionary.Add(string.Format("checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-{0}.price", 1), paymentRequest.PurchaseOrder.ShippingTotal.ToInvariantString());
    dictionary.Add(string.Format("checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-{0}.price.currency", 1), paymentRequest.Payment.PurchaseOrder.BillingCurrency.ISOCode);
    
    // Add the world for valid shipping as uCommerce handles shipping restrictions.
    // "world-area" must be numbered for shipping methods.
    dictionary.Add(string.Format("checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-{0}.shipping-restrictions.allowed-areas.world-area-{0}", 1), "true");

    Let me know what you think.

  • Søren Spelling Lund 1797 posts 2786 karma points
    May 22, 2012 @ 15:35
    Søren Spelling Lund
    0

    uCommerce 2.6.1.0 includes the fix for Google Checkout missing shipping fees and order level discounts.

  • Tony Bolton 83 posts 109 karma points
    May 22, 2012 @ 16:10
    Tony Bolton
    0

    Wow cheers Søren - that's ace service!

Please Sign in or register to post replies

Write your reply to:

Draft