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.

  • Naveen 6 posts 26 karma points
    Sep 12, 2012 @ 08:34
    Naveen
    0

    GoogleCheckout PaymentMethod not working in Ucommerce Demo store giving "Bad Request" Error

    In UpdatePayment.xslt, CreatePayment(PaymentId, -1, true(), true())...is trying to request a payment by using inbuilt GoogleCheckout api call by accessing

    https://sandbox.google.com/checkout/api/checkout/v2/merchantCheckoutForm/Merchant/My_merchant_Id ----- getting InnerException having Response Status description as "Bad Request".

     

  • Søren Spelling Lund 1797 posts 2786 karma points
    Sep 17, 2012 @ 11:27
    Søren Spelling Lund
    0

    I've seen this a couple of times when using a currency for payment different than the one configured on the merchant account. Google Checkout has a log section when you're logged in, which contains more info about the error.

  • Naveen 6 posts 26 karma points
    Oct 01, 2012 @ 11:39
    Naveen
    1

    Thanks Soren, exactly that was the issue...

  • Søren Spelling Lund 1797 posts 2786 karma points
    Oct 01, 2012 @ 11:57
    Søren Spelling Lund
    0

    Thanks for updating the thread with your findings.

  • e 23 posts 42 karma points
    Dec 04, 2012 @ 21:33
    e
    0

    We are seeing this issue as well.  We are running umbraco 4.9.1 with uCommerce 3. 

    I didn't see a place to specify currency in our Google Checkout sandbox, but we are based in the US so I assume it is USD.  I have cleared out the countries and currencies from our uCommerce setup so that only 'USD' is left.  This should mean that the currencies are consistent, but we still get the 'Bad Request' error.

    Error loading MacroEngine script (file: uCommerce/Preview.cshtml)

    Here is the debug trace:

    Error Loading Razor Script (file: uCommerce Preview) The remote server returned an error: (400) Bad Request.    at System.Net.HttpWebRequest.GetResponse()
      at UCommerce.Transactions.Payments.GoogleCheckout.GoogleCheckoutPaymentMethodService.PostGoogleCheckout(String url, Dictionary`2 postValue)
      at UCommerce.Transactions.Payments.GoogleCheckout.GoogleCheckoutPaymentMethodService.CreatePlaceholderPayment(PaymentRequest paymentRequest)
      at UCommerce.Transactions.Payments.GoogleCheckout.GoogleCheckoutPaymentMethodService.RequestPayment(PaymentRequest paymentRequest)
      at UCommerce.Transactions.TransactionLibraryInternal.RequestPayment(Int32 paymentId)
      at Castle.Proxies.TransactionLibraryInternalProxy.RequestPayment_callback(Int32 paymentId)
      at Castle.Proxies.Invocations.TransactionLibraryInternal_RequestPayment.InvokeMethodOnTarget()
      at Castle.DynamicProxy.AbstractInvocation.Proceed()
      at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation)
      at Castle.DynamicProxy.AbstractInvocation.Proceed()
      at Castle.Proxies.TransactionLibraryInternalProxy.RequestPayment(Int32 paymentId)
      at UCommerce.Transactions.TransactionLibraryInternal.RequestPayments()
      at Castle.Proxies.TransactionLibraryInternalProxy.RequestPayments_callback()
      at Castle.Proxies.Invocations.TransactionLibraryInternal_RequestPayments.InvokeMethodOnTarget()
      at Castle.DynamicProxy.AbstractInvocation.Proceed()
      at UCommerce.Infrastructure.Interceptor.ExceptionLoggingInterceptor.Intercept(IInvocation invocation)
      at Castle.DynamicProxy.AbstractInvocation.Proceed()
      at Castle.Proxies.TransactionLibraryInternalProxy.RequestPayments()
      at UCommerce.Api.TransactionLibrary.RequestPayments()
      at ASP._Page_macroScripts_uCommerce_Preview_cshtml.Execute() in c:\inetpub\wwwroot\BMOS-DEV-v02000517rc1\wwwroot\macroScripts\uCommerce\Preview.cshtml:line 9
      at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
      at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors)
      at System.Web.WebPages.WebPage.ExecutePageHierarchy()
      at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
      at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)
      at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)

    I looked in the Google Checkout sandbox for the logs to try and debug what was posted, but when i got to tools->integration console there is nothing in the list. 

    Is there another place to look for the logs? 

    I have the GoogleCheckout.config updated with our sandbox merchant ID and Key, but i'm not sure how to verify what is being sent by uCommerce, and to who.


    -e

     

  • Søren Spelling Lund 1797 posts 2786 karma points
    Dec 07, 2012 @ 20:59
    Søren Spelling Lund
    0

    You're right that it's probably a currency mismatch scenario.

    Trying clearing your cookies to force uCommerce to create a new cart for you with USD currency and retry.

  • e 23 posts 42 karma points
    Dec 12, 2012 @ 19:16
    e
    0

    Thanks for the reply.  Unfortunately, no luck with clearing the cookies.

    With Firefox, I tried clearing all cookies that were displayed in Firebug.  I still received the 'Bad Request' error.  I then tried bringing up the site and going through checkout in Chrome, which i had never used for the site before (so there should be no lingering cookies).  I also received the 'Bad Request' error.

    When i tried the checkout in IE (also first time for the website), i received a different error immediately on post:

    HTTP 500: A potentially dangerous Request.Form value was detected from the client (send-order="...ete Order <I class="icon-arrow...").

    I still see no indication in the Google Checkout integration console of any request, so it doesnt' look like it is ever getting to my account.

    Is there a way to trace what 'UCommerce.Transactions.Payments.GoogleCheckout.GoogleCheckoutPaymentMethodService' is sending, and to where?  Is there a way to figure out what about the request is a 'Bad Request'?

    I tried using Fiddler to inspect what was being sent, but i believe that only tracks from my browser up to my web server, not from the web server to Google.  One possibly interesting thing i noticed is that in IE, the raw 'send' data was: "send-order=Complete+Order+%3CI+class%3D%22icon-arrow-right+icon-white%22%3E%3C%2FI%3E", while in Chrome it was simply: "send-order="

    There isn't a whole lot of configuration on the uCommerce side for Google checkout, just a few entries in the GoogleCheckout.config file and the payment method item, and those looked fine. 

    Are there configuration setups in the Google Sandbox that could have been missed?

    Are there web server settings that need to be specified for the communication to Google to work?

     

  • e 23 posts 42 karma points
    Dec 13, 2012 @ 21:22
    e
    0

    Solved!

    It turns out that after all that technical debugging, it was actually just a matter of the GoogleCheckout.config file having 'testMode=false' while i was still in the Google sandbox. 

  • Søren Spelling Lund 1797 posts 2786 karma points
    Dec 14, 2012 @ 11:25
    Søren Spelling Lund
    0

    Hi Erik,

    Thanks for beint awesome and posting the follow-up in the forum.

    I will update the docs for Google Checkout with a note about the config requirement for sandbox.

Please Sign in or register to post replies

Write your reply to:

Draft