如何使用curl将购物车详细信息传递给google checkout
我正在开发具有购物车页面的网站。我正在尝试集成 Google 沙箱 Checkout 支付网关。当用户单击 Google Checkout 按钮时,我不想重定向到 Google Checkout 页面。我想使用 Google Checkout 验证或授权用户卡详细信息,并将所有购物车详细信息传递给 Google Checkout。因此,我们可以使用 php curl 来实现此目的。一旦我们将详细信息作为请求传递,就会从 Google Checkout 获得响应。通过使用我可以继续该回复。是否可以在 Google Checkout 中执行此操作。如果是,请举一些例子。
I am developing site which has the cart page.I am trying to integrate Google sandbox Checkout payment gateway. I don't want to redirect to Google checkout page when user click Google Checkout button. I want to validate or authorize the user card details with Google checkout ,also pass all cart details to Google Checkout.So we can achieve this by using php curl.Once we pass our details as request and will get response from Google Checkout.By using that response i can proceed further.Is it possible to do that in Google Checkout. If yes kindly give some example.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先确保您的沙箱商户 ID / 密码正确。它们与生产帐户中的不同。
由于该错误与基本身份验证相关,因此请使用命令行版本的curl 来验证您是否拥有正确的凭据。发布类似的内容并验证您是否得到正确的响应:
curl -d“some xml”
https://1234567890:[电子邮件受保护]/checkout/api/checkout/v2/request/Merchant/1234567890
此文档有更多详细信息使用curl 将 XML 购物车发布到 Google Checkout:
https: //checkout.google.com/support/sell/bin/answer.py?hl=zh-CN&answer=70646
First make sure that your sandbox merchant id / password are correct. They are different than the ones from production accounts.
Since the error is related to Basic Authentication, use the command line version of curl to verify that you have the right credentials. Post something like this and verify that you get a correct response back:
curl -d "some xml"
https://1234567890:[email protected]/checkout/api/checkout/v2/request/Merchant/1234567890
This doc has more details on posting XML carts with curl to Google Checkout:
https://checkout.google.com/support/sell/bin/answer.py?hl=en&answer=70646