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.
I would like to offer the paypal option and therefore working on creating a module for it.
I started out with this:
http://sanwebe.com/assets/paypal-express-checkout/
Which got me started pretty good, but my "problem" is now that the receiver is automatically the API username?
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?
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?
Update: I just found out I can have
&PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=receiver@email.com
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:
Doesn't the SELLERPAYPALACCOUNTID work in the sandbox?
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.
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.
== EDIT ==
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
)
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.
You can add this parameter:
PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=someone@gmail.com
other parameters can be configured also for that receiver,like:
PAYMENTREQUEST_0_CURRENCYCODE=USD
PAYMENTREQUEST_0_AMT=300
PAYMENTREQUEST_0_ITEMAMT=200
PAYMENTREQUEST_0_TAXAMT=100
PAYMENTREQUEST_0_DESC=Summer Vacation trip
PAYMENTREQUEST_0_INSURANCEAMT=0
PAYMENTREQUEST_0_SHIPDISCAMT=0
PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=someone@gmail.com
PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED=false
PAYMENTREQUEST_0_PAYMENTACTION=Order
PAYMENTREQUEST_0_PAYMENTREQUESTID=CART26488-PAYMENT0
Note: you can add up to 10 receivers, just change the index like:
PAYMENTREQUEST_1_.....
PAYMENTREQUEST_2_.....