php 为网站设置在线支付
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5855989/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Setting up online payments for website
提问by Ben
I am a web designer but haven't set up online payments before. I'm using a linux server with php and MySQL. I have a new contract to set up a very simple website where people can buy one of three different products (very basic). I want them to be able to pay using credit/debit cards. My question is can anyone point me to a good resource page for setting this up?
我是一名网页设计师,但之前没有设置过在线支付。我正在使用带有 php 和 MySQL 的 linux 服务器。我有一个新合同来建立一个非常简单的网站,人们可以在其中购买三种不同产品中的一种(非常基本的)。我希望他们能够使用信用卡/借记卡付款。我的问题是任何人都可以指向一个很好的资源页面来设置它吗?
I don't think it is worth me installing an open source solution such as Opencart, Zencart or Presta because there are only three products to choose from and users won't need to register, just buy it online. so I am thinking the best way is to hand code it, however I'm sure it's been done many times before and there must be a good resource for this. I know I'll have to use a secure certificate and also use a gateway to handle the payments, I just need the information on how to do this. If anyone can point me in the right direction or offer any advice on going about setting it up I would appreciate it.
我认为不值得我安装 Opencart、Zencart 或 Presta 等开源解决方案,因为只有三种产品可供选择,用户无需注册,只需在线购买即可。所以我认为最好的方法是手工编写代码,但是我确信以前已经做过很多次了,并且必须有一个很好的资源。我知道我必须使用安全证书并使用网关来处理付款,我只需要有关如何执行此操作的信息。如果有人能指出我正确的方向或提供有关设置它的任何建议,我将不胜感激。
回答by Elzo Valugi
Payments authorization is not something that you do by yourself. What you can do is to open a merchant account with a bank or to use an API from Paypal, Google checkout, Authorize.net or others. Opencart, Magento or Presta will act as intermediaries and they have modules that allow sending the data to the entity that can check and charge the credit card. That entity will send you back a message that the transaction succeeded or not. This way the clients are protected and you dont have to develop your (potentialy unsecure) solution.
付款授权不是您自己做的事情。您可以做的是在银行开设商家帐户或使用来自 Paypal、Google checkout、Authorize.net 或其他公司的 API。Opencart、Magento 或 Presta 将充当中介,它们具有允许将数据发送到可以检查和收取信用卡费用的实体的模块。该实体将向您发送一条消息,说明交易成功与否。通过这种方式,客户端受到保护,您不必开发(可能不安全的)解决方案。
If you are a web designer I would recommend you to concentrate on design and not to complicate your life with an implementation that can be complicated and potentially risky for the client. Just collaborate with a programmer who has experience in this.
如果您是一名网页设计师,我会建议您专注于设计,而不是让您的生活复杂化,因为实施起来可能很复杂,而且对客户有潜在风险。只需与有这方面经验的程序员合作即可。
回答by bumperbox
paypal web payments standard is one of the cheapest ways to get setup, the paypal website can generate all the code you need to paste into your website to facilitate the process.
paypal 网络支付标准是最便宜的设置方式之一,paypal 网站可以生成您需要粘贴到网站中的所有代码,以简化流程。
downsides. higher merchant fee (at time of writing i think it is about 3.4% + a per transaction fee)
缺点。更高的商家费用(在撰写本文时,我认为大约是 3.4% + 每笔交易费用)
if you are selling high price items or high volumes you can save money by setting up a merchant account direct with your bank and getting a payment processor to handle the transactions. most of them have an option for a hosted payment page. (eg they handle all the secure part of the transaction, and fire back a message to your site to confirm the process is successful)
如果您销售高价商品或大批量商品,您可以通过直接在银行开设商家账户并让付款处理器处理交易来节省资金。他们中的大多数都有托管支付页面的选项。(例如,他们处理交易的所有安全部分,并向您的站点发送消息以确认该过程成功)
shop around first, and try their demo sites, because some of the hosted payments pages are (in typical bank style) very very user unfriendly
首先货比三家,并尝试他们的演示网站,因为一些托管支付页面(以典型的银行风格)对用户非常不友好
回答by John
Even if you are a web designer you are still able to do the online payments for your website.
即使您是网页设计师,您仍然可以为您的网站进行在线支付。
At first, there are some easy ways to handle payment, like paypal website stardard. If you are using third party cart, there are plenty of online payment integration, you don't need to worry about API as long as you're not developing it by yourself; it would be a hell of a headache.
首先,有一些简单的方法来处理付款,比如贝宝网站标准。如果您使用第三方购物车,网上支付集成很多,只要不是自己开发就不用担心API;这将是一个非常头痛的问题。
Third party integration is very helpful and very understandable, they will give you the module and instructions for the payment integration of your site. Again, even if you are a web designer, you can do it.
第三方集成非常有帮助且易于理解,他们会为您提供有关网站支付集成的模块和说明。同样,即使您是网页设计师,您也可以做到。
回答by Mihai Ionescu
For selling only one of three different products you may want to try a Buy Now button or a simple shopping cart. You would still need an online payment processor like PayPal or Google Checkout to comply with all the credit card government regulations (e.g. PCI compliance).
如果只销售三种不同产品中的一种,您可能需要尝试“立即购买”按钮或简单的购物车。您仍然需要像 PayPal 或 Google Checkout 这样的在线支付处理器来遵守所有信用卡政府规定(例如 PCI 合规性)。
For PHP shopping cart integration examples using Goolge Checkout you may find this sample code useful:
对于使用 Goolge Checkout 的 PHP 购物车集成示例,您可能会发现此示例代码很有用:
http://code.google.com/p/google-checkout-php-sample-code/
http://code.google.com/p/google-checkout-php-sample-code/
Hope this helps...
希望这可以帮助...