简体   繁体   English

仅使用带有 Omnipay 的信用卡接受 PayPal 付款 (PHP)

[英]Accept PayPal payment using only credit card with Omnipay (PHP)

I integrated OmniPay in my project few days ago, and I wondered if there is any option coming with it to actually enable credit card payments.几天前我将 OmniPay 集成到我的项目中,我想知道是否有任何选项可以实际启用信用卡支付。

https://github.com/thephpleague/omnipay https://github.com/thephpleague/omnipay

I want to understand how to enable the PayPal credit card payments (which do not require an paypal account) using it.我想了解如何使用它启用 PayPal 信用卡付款(不需要 paypal 帐户)。

What PayPal API settings should I enable?我应该启用哪些 PayPal API 设置? How can I code this?我该如何编码? Is there any option to do this using PayPal & PHP at all?是否有任何选项可以使用 PayPal 和 PHP 来做到这一点?

I tried to document myself on this and I couldn't find any answer to this question.我试图记录自己,但找不到这个问题的任何答案。 Neither on the https://github.com/thephpleague/omnipay nor on Stack.既不在https://github.com/thephpleague/omnipay上也不在 Stack 上。

The setting mentioned in comments, 'PayPal Account Optional' exists so you have the ability to only accept payments from people with an account (when set to 'No').评论中提到的设置“PayPal Account Optional”存在,因此您只能接受有账户的人的付款(当设置为“No”时)。

If set to 'Yes', payments without an account can be possible.如果设置为“是”,则无需帐户即可付款。 But whether the option will be offered to a particular payer in a particular PayPal checkout attempt depends on very many factors, which you do not control.但是,在特定的 PayPal 结账尝试中,该选项是否会提供给特定的付款人取决于很多您无法控制的因素。

The only way to have some guarantee of a guest method being offered is to show a credit card form on your own site, before the buyer reaches a PayPal.com page, using the black 'Debit or Credit Card' button that is part of the JS SDK. You can see an example demo here: https://developer.paypal.com/demo/checkout/#/pattern/server保证提供访客方法的唯一方法是在买家到达 PayPal.com 页面之前,使用作为 JS SDK 一部分的黑色“借记卡或信用卡”按钮,在您自己的网站上显示信用卡表格. 你可以在这里看到一个示例演示: https://developer.paypal.com/demo/checkout/#/pattern/server

That JS code used for payer approval can be paired with any backend to create and capture the order via API -- including Omnipay, which essentially acts as a proxy for the PayPal API. This JS replaces any redirect over to PayPal which you might be familiar with from oler legacy integrations;用于付款人批准的 JS 代码可以与任何后端配对,以通过 API 创建和捕获订单——包括 Omnipay,它本质上充当 PayPal API 的代理。这个 JS 取代了您可能熟悉的任何重定向到 PayPal与旧版集成; the JS SDK is a more modern way to get the payer's approval, via a small in-context window or open a credit card form iframe instead which is a better UX than redirecting away anyway. JS SDK 是一种更现代的方式来获得付款人的批准,通过一个小的上下文 window 或打开信用卡表格 iframe 相反,这比重定向更好的用户体验。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM