我正在尝试将 google checkout 与我当前的网站集成。在将它传递给谷歌结账之前,我正在计算我这边的运费。问题是,当有人点击“google checkout”按钮时,他们会转到 google checkout,但不会显示运费。它实际上声明它将在下一步计算。在下一步中,它实际上显示了一个下拉菜单,其中包含我通过的运输选项,这是统一费率..
问题是,要进入下一步,您必须输入信用卡信息。另外,我的商店在购物车中显示了运费,所以去结账时只知道没有运费的价格会让人感到困惑。
这是我现在正在使用的测试代码,看看我是否可以让它在登录前显示发货(在此处示例:http://sensenich.bythepixel.com/test.html)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Site Title</title>
</head>
<body>
<form method="POST"
action="https://sandbox.google.com/checkout/api/checkout/v2/checkoutForm/Merchant/468503062558352"
accept-charset="utf-8">
<input type="hidden" name="item_name_1" value="Peanut Butter"/>
<input type="hidden" name="item_description_1" value="Chunky peanut butter."/>
<input type="hidden" name="item_quantity_1" value="1"/>
<input type="hidden" name="item_price_1" value="3.99"/>
<input type="hidden" name="item_currency_1" value="USD"/>
<input type="hidden"
name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-1.name"
value="UPS Next Day Air"/>
<input type="hidden"
name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-1.price"
value="20.00"/>
<input type="hidden"
name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-1.price.currency"
value="USD"/>
<input type="hidden" name="_charset_" />
<!-- Button code -->
<input type="image"
name="Google Checkout"
alt="Fast checkout through Google"
src="http://sandbox.google.com/checkout/buttons/checkout.gif?merchant_id=468503062558352&w=180&h=46&style=white&variant=text&loc=en_US"
height="46"
width="180" />
</form>
</body>
</html>
最佳答案
如果您可以自己计算运费,如果您只有一个固定费率,这听起来很有可能:
- 删除 Checkout 的运费值以禁用该端的运费计算。
- 自己计算运费并将其作为“产品”传递。
Checkout 不会自动假定它是数字交付销售并省略送货地址或任何其他内容,它会假设没有运费(...先测试一下,自从我使用 Checkout 以来已经有一段时间了)。
如果轨道上还有其他变量,例如州税率或需要在设置运输成本之前处理的折扣/优惠券,这可能不是那么理想。
关于html - 谷歌结帐。可以在登录前显示运费吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2313643/