2

I am sending an xml request to google checkout and getting the xml response too.

The request that i m sending is

StringBuffer buf = new StringBuffer();

buf.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");

buf.append("<checkout-shopping-cart xmlns=\"http://checkout.google.com/schema/2\">");

buf.append("<shopping-cart>");

buf.append("<items>");

buf.append("<item>");

buf.append("<item-name>Ville</item-name>");
buf.append("<item-description>BabbleVille</item-description>");
buf.append("<unit-price currency=\"USD\">12</unit-price>");
buf.append("<quantity>1</quantity>");
buf.append("</item>");
buf.append("</items>");
buf.append("</shopping-cart>");
buf.append("<checkout-flow-support>");
buf.append("<merchant-checkout-flow-support>");
buf.append("<shipping-methods>");
buf.append("<flat-rate-shipping name=\"SuperShip Ground\">");
buf.append("<price currency=\"USD\">9.99</price>");
buf.append("</flat-rate-shipping>");
buf.append("</shipping-methods>");
buf.append("</merchant-checkout-flow-support>");
buf.append("</checkout-flow-support>");
buf.append("</checkout-shopping-cart>");

The response that I am getting is

<?xml version="1.0" encoding="UTF-8"?>
<checkout-redirect xmlns="http://checkout.google.com/schema/2" serial-number="4f6d85ac-0e83-41f1-81ef-60e86bd07b9d">

<redirect-url>https://sandbox.google.com/checkout/view/buy?o=shoppingcart&amp;shoppingcart=602624134680807</redirect-url>

</checkout-redirect>

Now, I dont know what to do with this response. I am very new to Google Checkout. The redirect url that i get if opened in browser then shows error. How will the buyer be redirected to enter his google account.

Can someone please let me know how to proceed with this response?

Kara
  • 6,115
  • 16
  • 50
  • 57
sunil
  • 9,541
  • 18
  • 66
  • 88
  • 1
    I get There was an error processing your request. Please go back and try again. Can someone let me know why this problem occurs? – sunil Jul 20 '10 at 11:34
  • 1
    This problem has been solved. Needed to replace & with just &. But now since this opens in WebView how can I get the response of what is being called. In case, if I need transaction id and those information then how will i get that. – sunil Jul 20 '10 at 12:20
  • 1
    How did you initialize ApiContext class? I am getting an error in it: Could not find class com.google.checkout.sdk.commands.ApiContext' ? I am initializing it in onCrete. Thanks – sandalone Jun 12 '11 at 06:57
  • @sunil Let me How to approach this..i am new to google checkout.I am also getting error while initializing the apicontext class. – Ramesh Akula Mar 30 '12 at 10:46

1 Answers1

1

I think this might help you. Google Checkout

** UPDATE **

Google Checkout has been deprecated. Now Google encourages you to use Google Wallet.