PHP:开始PayPal结帐的简单方法? [英] PHP: Easy way to start PayPal checkout?

查看:75
本文介绍了PHP:开始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有上百万个不同的版本.我了解到的是,我需要的一种叫做贝宝网站付款".有人可以确认吗?

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?

推荐答案

是的,基本上,您创建一个表单,其中包含一些准备就绪的隐藏字段(例如金额和未填写内容),然后提交.您甚至可以使用JavaScript提交此文件,因此它将客户的权利带到PayPal来完成交易.

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.

例如:

<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_websitepaymentsstandard_integrationguide.pdf

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

这篇关于PHP:开始PayPal结帐的简单方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆