开发者

Google Checkout and Django integration question

I haven't used Google Checkout before, but their integration seems pretty simple. I do have a question, though. I plan to integrate Google Checkout with Django, but how would I be able to specify the amount of a product available in the Django CMS and have it sync for when someone buys a product. Example: 1 product of a t-shirt. Person buys the 1 t-shirt through Google Checkout -- I would want the CMS to set that quantity to 0 until a user puts the quantity back to more than 0. Also, there will be t-shirt sizes from XS to XL, so would it make the process more complicated?

Am I correct that I can do something like this when integrating Google Checkout to the Django template?

<div class="product">
  <img class="product-image" src="{{ product.image }}"/><br/>
  <span class="product-title">{{ product.title }}</span><br/>
  <span class="product-price">{{ product.price }}</span><br/>
  <div  role="button" alt="Add to cart" tabindex="0" class="googlecart-add-button"></div>
</div>

Then upon clicki开发者_高级运维ng checkout, it will automatically go to the Google Checkout process.


For inventory management systems you should consider using the Google Checkout Notifications API and Order Processing API. You will receive callbacks that will inform you on the state of the order, which will allow you to update the inventory accordingly. Without notifications you have no guarantee that the user has completed the purchase order after leaving your website.

http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Notification_API.html

http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Processing.html#order_processing_api


I haven't used Google Checkout specifically, but online payment providers typically provide a callback mechanism at the end of the process. This is a URL on your site which the provider will call, passing it the details of the cart and payment, so that you know the user has paid and you should therefore despatch the goods. You can use this same process to update your stock system.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜