Google Checkout 立即购买按钮
我已经浏览了 Google 文档和各种论坛来寻找答案,但似乎找不到我要找的东西。
我有一个网站,用户填写表格并提交。提交按钮是 Google Checkout 的“立即购买”按钮,可将用户带到 Google 进行付款。 这一切都很好,但是,我需要将用户在表单中输入的信息存储到 MySQL,前提是他们付款成功。
然后,输入的数据会自动从数据库中提取并显示在网站上。
我唯一的问题是告诉我的 PHP 脚本付款是否成功。
我可以通过“立即购买”按钮实现此目的吗?
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 problem is telling my PHP script that payment was sucessful or not.
Can I achieve this with a Buy Now button?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要回调网址
https://checkout.google.com/ support/sell/bin/answer.py?answer=134463
如果订单正常,它将回调您提供的给定网址,这样您就可以使用您的数据库来降低库存或发送电子邮件PHP等...
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...
您需要在服务器上实现某种订单处理服务。
然后,您可以从 Google Checkout 收到有关订单状态的各种通知:
http:// /code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Processing.html
以下是指向 PHP Google Checkout 库的链接,该库演示了如何在您的服务器上处理订单通知:
http://code.google.com/p/google-checkout-php-示例代码/
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/