PayPal 集成,我将如何定义接收方帐户? [英] PayPal Integration, how would I define the receiver account?

查看:15
本文介绍了PayPal 集成,我将如何定义接收方帐户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个非常小的电子商务软件,它允许用户展示他们的产品,以便让客户看到并购买.

I'm working on a very small ecommerce software that allows users to put their products up in order to get customers to see them and buy them.

我想提供 paypal 选项,因此正在为它创建一个模块.

I would like to offer the paypal option and therefore working on creating a module for it.

我是从这个开始的:

http://sanwebe.com/assets/paypal-express-checkout/

哪个让我开始很好,但我的问题"是现在接收器自动是 API 用户名?

Which got me started pretty good, but my "problem" is now that the receiver is automatically the API username?

这就是我在付款后从贝宝收到的响应的 RECEIVEREMAIL 参数值中看到的内容.

That is what i can see in the RECEIVEREMAIL parameter value from the response that I get from paypal after an payment.

我希望接收者是我在数据库中收到的用户电子邮件.以便他们将付款直接存入他们的帐户.

I would like the receiver to be my users email which i got in the db. So that they get the payment directly into their account.

所以我需要在代码中的某处指定电子邮件/贝宝帐户电子邮件?

So I would need to specify the email/paypal account email somewhere in the code?

希望有人能向我解释这将如何完成,我可以理解在沙盒模式下可能无法做到这一点 - 但有人可以澄清 API 信息是一回事而接收者是另一回事吗?

Hope somebody can explain me how this would be done, I can understand it may not be possible doing while in sandbox mode - but can someone clarify that API information is one thing and receiver is another?

更新:我刚刚发现我可以拥有

&PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=receiver@email.com

在我致电 PayPal 时.虽然这仍然不起作用,但它仍然显示了开发人员.api 用户名.

in my call to PayPal. Although this still does not work, it still shows the dev. api username.

这是另一个同样的问题,但没有回答:

Here's another with the same question, but left unanswered:

SELLERPAYPALACCOUNTID 不是在沙箱中有效吗?

推荐答案

您的用户需要为您的应用程序授予 API 权限,以代表他们进行 API 调用.然后您仍将使用您自己的 API 用户名、密码和签名,但您还需要包含一个 SUBJECT 参数.SUBJECT 值将是为您的应用授予权限的用户的电子邮件地址或 PayPal 商家 ID.

Your users need to Grant API Permissions for your application to make API calls on their behalf. Then you would still use your own API username, password, and signature, but you'd also include a SUBJECT parameter along with those. The SUBJECT value would be the email address or PayPal merchant ID of a user who has granted permissions for your app.

用户可以通过他们的 PayPal 个人资料手动授予权限,或者您可以使用 Permissions API 将其构建到您的应用中.但是,如果您使用权限 API,您最终会在标头 (OAuth) 中使用令牌,而不是 SUBJECT 参数.

Users can grant permissions manually through their PayPal profile, or you can build this into your app using the Permissions API. If you go with the permissions API, though, you end up using tokens in the header (OAuth) as opposed to the SUBJECT parameter.

== 编辑 ==

看来这肯定是在某个 API 版本发布之类的东西中进行了更新.我只是在沙箱中运行以下没有问题.

It seems that this must have been updated in an API version release or something. I just ran the following in the sandbox with no issues.

[REQUESTDATA] => Array
    (
        [USER] => sandbo_1215254764_biz_api1.angelleye.com
        [PWD] => 12xxxx74
        [VERSION] => 109.0
        [BUTTONSOURCE] => AngellEYE_PHPClass
        [SIGNATURE] => AiKZhEExxxxxxxxz2qxKx96W18v
        [METHOD] => DoExpressCheckoutPayment
        [TOKEN] => EC-9SG69555XT1155150
        [PAYERID] => YW66KXBKJRRES
        [RETURNFMFDETAILS] => 1
        [PAYMENTREQUEST_0_AMT] => 100.00
        [PAYMENTREQUEST_0_CURRENCYCODE] => USD
        [PAYMENTREQUEST_0_ITEMAMT] => 80.00
        [PAYMENTREQUEST_0_SHIPPINGAMT] => 15.00
        [PAYMENTREQUEST_0_TAXAMT] => 5.00
        [PAYMENTREQUEST_0_DESC] => This is a test order.
        [PAYMENTREQUEST_0_NOTETEXT] => This is a test note before ever having left the web site.
        [PAYMENTREQUEST_0_PAYMENTACTION] => Sale
        [PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID] => sandbo_1204199080_biz@angelleye.com
        [L_PAYMENTREQUEST_0_NAME0] => Widget 123
        [L_PAYMENTREQUEST_0_DESC0] => Widget 123
        [L_PAYMENTREQUEST_0_AMT0] => 40.00
        [L_PAYMENTREQUEST_0_NUMBER0] => 123
        [L_PAYMENTREQUEST_0_QTY0] => 1
        [L_PAYMENTREQUEST_0_ITEMURL0] => http://www.angelleye.com/products/123.php
        [L_PAYMENTREQUEST_0_NAME1] => Widget 456
        [L_PAYMENTREQUEST_0_DESC1] => Widget 456
        [L_PAYMENTREQUEST_0_AMT1] => 40.00
        [L_PAYMENTREQUEST_0_NUMBER1] => 456
        [L_PAYMENTREQUEST_0_QTY1] => 1
        [L_PAYMENTREQUEST_0_ITEMURL1] => http://www.angelleye.com/products/456.php
    )

付款已在 sandbo_1204199080_biz@angelleye.com 帐户中结束.只要确保您在 SetExpressCheckout 和 DoExpressCheckoutPayment 中设置了相同的值,就可以了.

The payment wound up in the sandbo_1204199080_biz@angelleye.com account. Just make sure you have the same value set in both SetExpressCheckout and DoExpressCheckoutPayment and you should be fine.

这篇关于PayPal 集成,我将如何定义接收方帐户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆