简体   繁体   English

如果买家拥有Paypal帐户,如何通过Paypal直接付款进行付款?

[英]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付款工作流程:

1. Express checkout: 1.快速结帐:

in 4 steps: 分4步:

  1. The web app submits a payment request to PayPal via some PayPal API (see below), 该网络应用通过某些PayPal API(请参见下文)向PayPal提交付款请求
  2. The buyer is redirected to PayPal web server and once there the buyer: 买方被重定向到PayPal Web服务器,并且一旦到达,买方:

    • can login (with his paypal username and password), if they already possess a PayPal Account, or 如果他们已经拥有贝宝帐户,则可以登录(使用其贝宝用户名和密码),或者
    • can submit credit/debit card data, if they do not possess any PayPal ACCOUNT 如果他们没有任何PayPal帐户,则可以提交信用卡/借记卡数据
  3. confirm purchase on paypal's server, 在贝宝的服务器上确认购买,

  4. the buyer is redirected back to the application server, "where the settlement must be done to complete payment". 买方将被重定向回应用服务器,“必须在其中完成结算才能完成付款”。

2. Direct Payment: 2.直接付款:

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: 所以:

  1. 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设置测试商家用户...也许这是沙箱的限制?

  2. 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: 简而言之:

  1. 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开发者页面 ,选择应用程序 ,然后选择沙箱帐户

  2. 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.

相关问题 通过电子邮件访问贝宝帐户 - Access paypal account through email 我如何在 Sharetribe 开源上通过 Paypal 实现付款? - How can i implement payment through Paypal on Sharetribe opensource? 贝宝付款是否需要其他用户支付全部金额的一部分? - Paypal payment that depends on other users to pay a share of the entire amount? 如何检查贝宝付款是否有效? - How to check in PayPal is payment valid? 有没有一种方法可以检查用户在PayPal结帐中的付款方式(使用自己的帐户或信用卡)? - Is there a way to check how user pay(with his own account or credit card) in PayPal checkout? 贝宝(Live Paypal)实时付款通过后立即被撤销 - Live Paypal Payment Goes Through, Then Is Immediately Reversed Rails +贝宝。 如何向不同的卖家付款? - Rails + Paypal. How to pay different sellers? ActiveMerchant支持确定PayPal Express Checkout客户/买方的帐户状态(已验证/未验证) - ActiveMerchant's support for determining the account status (verified/unverified) of a PayPal Express Checkout customer/buyer 贝宝使用贝宝快递获取付款 - Paypal Recuring Payment with Paypal Express Paypal - 我在哪里可以找到沙箱帐户中的“加密付款设置”? - Paypal - where can I find “Encrypted Payment Settings” in sandbox account?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM