PHP:启动 PayPal 结帐的简单方法?

发布于 2024-12-07 11:46:49 字数 147 浏览 0 评论 0原文

我有功能齐全的购物车解决方案。我想要的只是我实际传递产品名称、总数、退货地址和我的贝宝地址的代码,以便它可以将我引导到购物车。有人能引导我走向正确的方向吗?

PayPal 有上百万个不同的版本。我了解到我需要的是“paypal 网站付款”。有人可以证实这一点吗?

I have completely functional cart solution. All I want is the code where I actually pass the name of the products, the total, the return address and my paypal address so that it can direct me to a shopping cart. Can anyone steer me in the right direction?

PayPal has a million different versions. What I've come to learn is that the one I need is called "paypal website payments". Can someone confirm this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

并安 2024-12-14 11:46:49

是的,网站付款标准是要走的路。

基本上,您创建一个表单,其中包含一些准备好的隐藏字段(例如金额等),然后提交它。您甚至可以使用 JavaScript 提交此信息,这样您的客户就可以直接访问 PayPal 来完成交易。

例如:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  <input type="hidden" name="cmd" value="_xclick" />
  <input type="hidden" name="business" value="your_paypal_email_account" />
  <input type="hidden" name="undefined_quantity" value="1" />
  <input type="hidden" name="item_name" value="Order #1111111 for So-and-So" />
  <input type="hidden" name="item_number" value="order_1111111" />
  <input type="hidden" name="amount" value="5.00" />
  <input type="hidden" name="shipping" value="0.00" />
  <input type="hidden" name="no_shipping" value="1" />
  <input type="hidden" name="cn" value="Comments" />
  <input type="hidden" name="currency_code" value="USD" />
  <input type="hidden" name="lc" value="US" />
  <input type="hidden" name="bn" value="PP-BuyNowBF" />
  <input type="hidden" name="return" value="http://www.example.com/some-page-to-return-to" />
  <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynow_SM.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />
  <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
</form>

您可以在此处找到有关其他可用参数的文档:https:// www.x.com/sites/default/files/pp_website paymentsstandard_integrationguide.pdf

Yes, the Website Payments Standard is the way to go.

Basically, you create a form that has a few hidden fields ready to go (such as amount and what not) and then submit it. You could even submit this with JavaScript, so it takes your customer right to PayPal to complete the transaction.

As an example:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  <input type="hidden" name="cmd" value="_xclick" />
  <input type="hidden" name="business" value="your_paypal_email_account" />
  <input type="hidden" name="undefined_quantity" value="1" />
  <input type="hidden" name="item_name" value="Order #1111111 for So-and-So" />
  <input type="hidden" name="item_number" value="order_1111111" />
  <input type="hidden" name="amount" value="5.00" />
  <input type="hidden" name="shipping" value="0.00" />
  <input type="hidden" name="no_shipping" value="1" />
  <input type="hidden" name="cn" value="Comments" />
  <input type="hidden" name="currency_code" value="USD" />
  <input type="hidden" name="lc" value="US" />
  <input type="hidden" name="bn" value="PP-BuyNowBF" />
  <input type="hidden" name="return" value="http://www.example.com/some-page-to-return-to" />
  <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynow_SM.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />
  <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
</form>

You can find documentation on the additional parameters available here: https://www.x.com/sites/default/files/pp_websitepaymentsstandard_integrationguide.pdf

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文