开发者

How to use Google Checkout with Google AppEngine Java

I have an AppEngine app. I'd like to add a payment system to it, and Google Checkout would seem the natural choice.

This shou开发者_如何学运维ld be simple, right? Google should want us to use their checkout, and provide handy jars and sample code. But after half an hour of web searching, the closest thing I found was how to use PayPal with appengine.

Can anyone point me to a tutorial or other documentation?

Or is PayPal the better option?


I was able to find http://code.google.com/p/google-checkout-java-sdk/ which looks like is should work with GAE. The documentation is pretty poor and they don't seem to have many examples. From a quick glance at the source code everything seems to center around the com.google.checkout.sdk.commands.ApiContext class. You simply create a new instance and then you can pass in EnvironmentInterface.CommandType and the data model you like to the postCommand method. For example you would pass a EnvironmentInterface.CommandType.CART_POST and a com.google.checkout.sdk.domain.ShoppingCart instance for new orders.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜