开发者

Submitting merchant defined shipping options using Google Checkout direct submission

开发者 https://www.devze.com 2023-01-09 05:40 出处:网络
Is it possible to set the shipping options in Google Checkout without using the server-server submission option?

Is it possible to set the shipping options in Google Checkout without using the server-server submission option?

I'm trying to keep this checkout process as simple as possible (mostly because I do not fully understand the server-server API section), and therefore I'm using the direct submission option in Google Ch开发者_运维问答eckout (details here. scroll down past the code block). So, I'd like to just add the hidden input fields to designate how much shipping will cost, and send it along.

Is this possible?

Shipping options documentation


It is, in fact, possible. Here's how I did it:

<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-1.name" value="Delivery"/>
<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-1.price" value="123.45"/>
<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="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-1.shipping-restrictions.allow-us-po-box" value="false"/>
<input type="hidden" name="checkout-flow-support.merchant-checkout-flow-support.shipping-methods.flat-rate-shipping-1.shipping-restrictions.allowed-areas.us-country-area-1.country-area" value="CONTINENTAL_48"/>

Tricky for sure, but it works.

0

精彩评论

暂无评论...
验证码 换一张
取 消