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

查看:93
本文介绍了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?

这是我从付款后从贝宝(Paypal)获得的响应中可以在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天全站免登陆