Google Checkout for UK based store - How to change currency

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Ian R
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Thu Jul 17, 2008 7:56 am

Google Checkout for UK based store - How to change currency

Post by Ian R » Fri Jul 18, 2008 6:04 am

Hi,

I'm tying to integrate the google checkout into a UK based store. The store currency is set to GBP and no other currencies exist in the admin area (I deleted the USD). My google sandbox merchant account is also in GBP. However when I try to use the checkout I get an error :-

# Google Checkout Failed.
# Google Checkout Response.IsGood = False
# Google Checkout Error Message = The currency used in the cart must match the currency of the seller account. You supplied a cart with USD and the seller account is associated with GBP.

The xml being sent to google is :-

<?xml version="1.0" encoding="utf-8"?>
<checkout-shopping-cart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://checkout.google.com/schema/2">
<shopping-cart>
<merchant-private-data>
<BasketId xmlns="">4</BasketId>
<BasketContentHash xmlns="">6E6D8226EF6CBE75E7A848288E95DB27</BasketContentHash>
</merchant-private-data>
<cart-expiration>
<good-until-date>2008-07-18T11:23:32.9353868Z</good-until-date>
</cart-expiration>
<items>
<item>
<item-name>Test Product - Not for Sale</item-name>
<item-description />
<unit-price currency="USD">24.9900</unit-price>
<quantity>1</quantity>
<merchant-private-item-data>
<basketItemId xmlns="">4</basketItemId>
<productId xmlns="">43</productId>
<orderItemType xmlns="">Product</orderItemType>
<shippable xmlns="">Yes</shippable>
<taxCodeId xmlns="">0</taxCodeId>
<weight xmlns="">0</weight>
<wrapStyleId xmlns="">0</wrapStyleId>
<optionList xmlns="">
</optionList>
<giftMessage xmlns="">
</giftMessage>
<lineMessage xmlns="">
</lineMessage>
<lastModifiedDate xmlns="">7/18/2008 10:53:29 AM</lastModifiedDate>
<orderBy xmlns="">2</orderBy>
<parentItemId xmlns="">11</parentItemId>
<sku xmlns="">
</sku>
<wishlistItemId xmlns="">0</wishlistItemId>
</merchant-private-item-data>
</item>
</items>
</shopping-cart>
<checkout-flow-support>
<merchant-checkout-flow-support>
<edit-cart-url>http://www.********.com/Basket.aspx</edit-cart-url>
<continue-shopping-url>http://www.********.com/Default.aspx</continue-shopping-url>
<tax-tables merchant-calculated="true">
<default-tax-table>
<tax-rules>
<default-tax-rule>
<shipping-taxed>false</shipping-taxed>
<rate>0</rate>
<tax-area>
<us-zip-area>
<zip-pattern>99999</zip-pattern>
</us-zip-area>
</tax-area>
</default-tax-rule>
</tax-rules>
</default-tax-table>
</tax-tables>
<shipping-methods>
<merchant-calculated-shipping name="Standard Postage">
<price currency="USD">4.9500</price>
</merchant-calculated-shipping>
</shipping-methods>
<merchant-calculations>
<merchant-calculations-url>http://www.********.com/Checkout/Google/MerchantCalc.ashx</merchant-calculations-url>
</merchant-calculations>
<request-buyer-phone-number>true</request-buyer-phone-number>
</merchant-checkout-flow-support>
</checkout-flow-support>



Can anyone tell me where the setting/parameter is that I need to change to process the transaction in GBP?

Thanks

Ian

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Re: Google Checkout for UK based store - How to change currency

Post by sohaib » Fri Jul 18, 2008 11:21 am

Hello,

You may not be using the 7.0 final release because this bug was fixed before final. Please upgrade to 7.0 final to get this fixed.

Ian R
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Thu Jul 17, 2008 7:56 am

Re: Google Checkout for UK based store - How to change currency

Post by Ian R » Fri Jul 18, 2008 11:31 am

Hi,

I think I am on the latest release, I only purchased the software last week. In the about section through the Admin panel I get

PLATFORM: ASP.NET
VERSION: 7.0
BUILD: 9879

with

CommerceBuilder.GoogleCheckout: 7.0.9632.0

Is this the latest?

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Re: Google Checkout for UK based store - How to change currency

Post by sohaib » Fri Jul 18, 2008 1:11 pm

Yes it is the latest build.

How many currencies do you have in your store?
What is your store's default currency (base currency)?

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Re: Google Checkout for UK based store - How to change currency

Post by sohaib » Fri Jul 18, 2008 1:12 pm

The store currency is set to GBP and no other currencies exist in the admin area (I deleted the USD).
OK ... I got the answer...
I will have a look at it in detail

Ian R
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Thu Jul 17, 2008 7:56 am

Re: Google Checkout for UK based store - How to change currency

Post by Ian R » Fri Jul 18, 2008 2:44 pm

I found this article in the google help pages but it looks like a hard coding solution?

http://checkout.google.com/support/sell ... opic=12164

I'm guessing the checkout should pick up the store currency dynamically.

Ian R
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Thu Jul 17, 2008 7:56 am

Re: Google Checkout for UK based store - How to change currency

Post by Ian R » Mon Jul 21, 2008 8:08 am

Should I report this in the defect system or is it correct to leave this on the forum for resolution?

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Re: Google Checkout for UK based store - How to change currency

Post by sohaib » Mon Jul 21, 2008 11:07 am

I reviewed the GoogleCheckout implementation again and it seemed to be all right.

Here is something to try.
In your Checkout/Google/GoogleCheckoutButton.ascx.cs
please add this line

Code: Select all

GCheckoutButton.Currency = Token.Instance.Store.BaseCurrency.ISOCode;
before this line

Code: Select all

CheckoutShoppingCartRequest Req = GCheckoutButton.CreateRequest();
If it solves your problem it means the fix included in 7.0 final was not complete.

Ian R
Ensign (ENS)
Ensign (ENS)
Posts: 13
Joined: Thu Jul 17, 2008 7:56 am

Re: Google Checkout for UK based store - How to change currency

Post by Ian R » Mon Jul 21, 2008 5:40 pm

Thanks - this line is required so it looks like the fix was missed. However when applied it introduced a new problem in line 42, my wife (who's far more intelligent than I on these things) corrected it with by putting the Convert.ToInt32 on lines 42 and 43.

Code: Select all

        int minOrderAmount = Convert.ToInt32( settings.OrderMinimumAmount);
        int maxOrderAmount = Convert.ToInt32(settings.OrderMaximumAmount);
Not sure why this happened but the combination of this and the additonal line of code you gave above resolved the issues and the transaction now works.

N.B I also discoved than Google checkout will feedback to able commerce in Sandbox mode if you change the callback API to http rather than https. This allows testing to continue before installing the SSL certificate.

Thanks for the help above.

Ian

Post Reply