开发者

Google Checkout Buy Now button

I have looked through the Google Docs and various forums for an answer but can't seem to find what I'm looking for.

I have a site, the user fills out a form and submits. The submit button is a Google Checkout 'buy now' button, which brings the user to Google to make payment. All this is fine, however, I need to store the information the user entered in the form to MySQL, only if their is sucessful payment.

This entered data is then automatically pulled from the database and displayed on the site.

My only p开发者_运维百科roblem is telling my PHP script that payment was sucessful or not.

Can I achieve this with a Buy Now button?


You need the callback URL

https://checkout.google.com/support/sell/bin/answer.py?answer=134463

If the order is ok, it will callback the given URL you gave and with that, you can work with your database the lower the stock or send and email through PHP ,etc...


You need to implement some sort of order processing service on your server.

Then you can receive various notifications from Google Checkout about the status of your order:

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

Here is a link to a PHP Google Checkout library that demonstrates how to process order notifications on your server:

http://code.google.com/p/google-checkout-php-sample-code/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜