2

我正在向 google checkout 发送 xml 请求并获得 xml 响应。

我发送的请求是

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>");

我得到的回应是

<?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>

现在,我不知道该怎么处理这个回复。我对 Google Checkout 很陌生。如果在浏览器中打开,我得到的重定向 url 然后显示错误。买家将如何被重定向以输入他的谷歌账户。

有人可以让我知道如何进行此回复吗?

4

1 回答 1

1

我想这可能会对你有所帮助。谷歌结帐

** 更新 **

Google Checkout已被弃用。现在Google鼓励您使用Google Wallet.

于 2011-01-11T06:12:49.827 回答