Paypal 将钱从一个帐户转移到另一个帐户

2021-12-29 00:00:00 php paypal paypal-adaptive-payments

我知道这个建议 如何汇款到任何贝宝帐户,但到目前为止我所尝试的对我来说似乎并不满意......

I am aware of this recommendation How to send money to any paypal account but what I've tried so far seems unsatisfiable to me...

我在一个社交网站上工作,我希望允许用户通过贝宝账户支付服务费用.实际付款应将钱从用户的贝宝帐户转移到我的贝宝帐户.

I am working on a social networking site on which I want to allow users to pay for services via paypal account. The actual payment should transfer money from a user's paypal account to my paypal account.

这是我目前想到的.我尝试使用自适应 api 和 PAY 选项,如果我使用我的帐户和凭据向其他用户汇款,它就可以工作.我有 biz 帐户,这称为隐式批准.如果其他用户想以这种方式向我付款,他必须拥有企业帐户并允许我的应用保存他的凭据,例如他的贝宝用户 ID、密码和签名,这并不好.

Here is what I came up so far. I tried to use adaptive api and PAY option and it works if I use my account and my credentials to send money to some other user. I have biz account and this is known as implicit approval. If some other user wants to pay me in this way he has to have business account and to allow my app to save his credentials like his paypal userid, password and signature which is not good.

接下来我尝试使用 permissions api 用于此目的.据我所知,这应该类似于生成令牌,允许我的应用程序代表用户在 facebook 上发布.我已经设法为以下权限创建了权限 api 文档中指定的签名:

Next thing I tried is to use permissions api for that purpose. As far as I understand this should work similar to generating token that allows my app to post on facebook on behalf of user. I've managed to create a signature as specified in the permissions api documentation for the following permissions:

$permissions = array('DIRECT_PAYMENT', 'MASS_PAY', 'TRANSACTION_DETAILS');

现在我不知道如何使用这个签名从授予我的应用上述权限的贝宝账户转账到我的贝宝账户.

And now I don't know how to use this signature to transfer money to my paypal account from the paypal account that granted my app the above mentioned permissions.

对我做错了什么或更好的方法有什么建议吗?

Any suggestion on what I am doing wrong or better way to do this?

推荐答案

嗯,如果我错了,请纠正我,但您建议的是一个买家和一个卖家(收件人)的相当规则的结账流程.
为此,您可以使用 PayPal Express Checkout,只需设置 NOSHIPPING=2,即可关闭收货地址收集功能.
或者,如果您有美国 PayPal 帐户,请在 https://www.paypal 注册数字商品的 PayPal Express Checkout.com/digitalgoods,您将能够使用基于 JavaScript 的精美 LightBox 结账体验(也称为在线结账").

Um, correct me if I'm wrong here, but what you propose is a fairly regular checkout flow with one buyer and one seller (recipient).
You can use PayPal Express Checkout for this and simply set NOSHIPPING=2, which will turn shipping address collection off.
Alternatively, if you have a US PayPal account, sign up for PayPal Express Checkout for Digital Goods at https://www.paypal.com/digitalgoods and you'll be able to use a fancy JavaScript-based LightBox checkout experience (also referred to as 'inline checkout').

Express Checkout 的优点在于它只需要最少两次 API 调用;SetExpressCheckout 和 DoExpressCheckoutPayment.

Express Checkout is fairly in that it only requires a minimum of two API calls; SetExpressCheckout and DoExpressCheckoutPayment.

发送:SetExpressCheckout 并提供 RETURNURL、CANCELURL、AMT(收费金额)和您的 API 凭据.
接收:您将从贝宝收到一个代币.将此令牌附加到以下链接:https:///www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-XXXXXX(其中 EC-XXXXX 是您的令牌).
一旦买家同意付款,他将被重定向回您的 RETURNURL,之后您可以自动或在显示购买摘要后调用 DoExpressCheckoutPayment.再次提供 TOKEN 并包含 PayerID(在附加到 RETURNURL 的 GET 中返回,或通过使用 TOKEN 调用 GetExpressCheckoutDetails 获得).
DoExpressCheckoutPayment 确认 ACK=Success 后,资金将从买家的 PayPal 帐户余额和/或卡中转移.

SEND: SetExpressCheckout and supply a RETURNURL, CANCELURL, AMT (amount to be charged) and your API credentials.
RECEIVE: You'll receive a TOKEN back from PayPal. Append this token to the following link: https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-XXXXXX (where EC-XXXXX is your token).
Once the buyer agrees to the payment, he'll be redirected back to your RETURNURL, after which you can either automatically, or after showing a purchase summary, call DoExpressCheckoutPayment. Supply the TOKEN again and include the PayerID (returned in GET appended to RETURNURL, or available by calling GetExpressCheckoutDetails with the TOKEN).
Once DoExpressCheckoutPayment acknowledges with ACK=Success, the funds will have been transferred from the buyerś PayPal account balance and/or card.

查看 https://www.x.com/ > 开发工具以及进一步了解文档、示例代码及其 SDK

Take a look at https://www.x.com/ > Dev Tools as well for further documentation, sample code and their SDK's

相关文章