[英]how to pay through a Paypal Direct Payment if buyer have a paypal account?
Context: I have to implement a Ruby on Rails e-commerce website, containing a shopping cart. 上下文:我必须实现一个包含购物车的Ruby on Rails电子商务网站。 An option is to use PayPal as a payment gateway.
一种选择是使用PayPal作为支付网关。 The merchant (PayPal business account owner) is from Italy.
商家(PayPal商业帐户所有者)来自意大利。
There are two different PayPal payment workflows available: 有两种不同的PayPal付款工作流程:
in 4 steps: 分4步:
The buyer is redirected to PayPal web server and once there the buyer: 买方被重定向到PayPal Web服务器,并且一旦到达,买方:
confirm purchase on paypal's server, 在贝宝的服务器上确认购买,
the buyer is redirected back to the application server, "where the settlement must be done to complete payment". 买方将被重定向回应用服务器,“必须在其中完成结算才能完成付款”。
the buyer submits credit/debit card data directly into the original web app. 买方将信用卡/借记卡数据直接提交到原始网络应用中。
I'd prefer to implement this second scenario. 我希望实现第二种方案。
About Paypal available APIs: I read something here: http://paypal.github.io/ 关于Paypal可用的API:我在这里读到一些东西: http : //paypal.github.io/
Paypal "REST" APIs are NOT still available out of the US, so I have to use Paypal "Classic" APIs. 贝宝(Paypal) “ REST” API在美国以外仍然不可用,因此我必须使用贝宝(Paypal)“经典” API。 Using
gem 'paypal-sdk-merchant'
seems clear to me about how to submit a payment from a credit/debit card. 对于我来说,使用
gem 'paypal-sdk-merchant'
似乎很清楚如何通过信用卡/借记卡付款。 I can't find any info about the possibility to submit a Direct Payment for a buyer that have a Paypal Account. 我找不到有关向具有Paypal帐户的买方提交直接付款的可能性的任何信息。
if a buyer pays through his Paypal Account: 如果买家通过其Paypal帐户付款:
:payer => {
:payment_method => "paypal" }
if a buyer pays through his credit card: 如果买家通过信用卡付款:
:payer => {
:payment_method => "credit_card"}
So: 所以:
Can I use the Classic API for a live Italian Merchant User? 我可以将Classic API用于意大利商家的实时用户吗? I'm asking because in PayPal sandbox it seems I can't set a test merchant user with country:IT ... maybe it's a sandbox limitation?
我问是因为似乎在PayPal沙箱中无法使用country:IT设置测试商家用户...也许这是沙箱的限制?
Can I do a direct payment with the Classic API supplying PayPal username/password (for users who have a PayPal account) instead of creditcard data (all other users)? 我是否可以使用Classic API(提供PayPal用户名/密码(适用于拥有PayPal帐户的用户)而非信用卡数据(所有其他用户))直接付款?
In short: 简而言之:
Yes, you can set up a merchant sandbox account on Paypal from Italy. 是的,您可以在意大利的Paypal上设置商家沙箱帐户。 You first need to login to Paypal with some real credentials (yours or your customer's), then go to to Paypal developers' page , select applications , then sandbox accounts .
您首先需要使用一些真实的凭据(您或您的客户的凭据)登录到Paypal,然后转到Paypal开发者页面 ,选择应用程序 ,然后选择沙箱帐户 。
I'm afraid direct payment is not part of the classic APIs, but I suggest you using the Paypal Express method. 恐怕直接付款不是经典API的一部分,但我建议您使用Paypal Express方法。 You can find docs here, and in Italian here .
您可以在这里找到文档 ,在这里可以找到意大利语。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.